Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Hook not running in the custom add-on

$
0
0

Replies: 0

Hello,

I am developing a custom add-on and want to just redirect the user to a custom thank you page.

I have used hook woocommerce_thankyou for template redirect and created a shortcode within which I have simply added wc_get_template( ‘checkout/thankyou.php’, array( ‘order’ => $order ) );

Which actually runs but the hook within the thankyou.php that display bank account details do_action( ‘woocommerce_thankyou_’ . $order->get_payment_method(), $order->get_id() ); doesn’t run at all.

It even prints $order->get_payment_method() and $order->get_id() when I debug.

I have my URL as
xyz.com/custom-thank-you-page/?order=50&key=wc_order_nJIyyCOfbT2XL

Can you help me out for what wrong I am doing? Do we have to include some files? I don’t want to use any other available add-ons.

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles