Hook to Custom Thank You Page
-
Hello, I have been using this hook to change the default Woocommerce order status and it works perfectly but once I replace the default thank you page with the custom thank you page using woolentor template builder, the function starts working. Can someone help me?
add_action( 'woocommerce_thankyou', 'woocommerce_thankyou_change_order_status', 10, 1 ); function woocommerce_thankyou_change_order_status( $order_id ){ if( ! $order_id ) return; $order = wc_get_order( $order_id ); if( $order->get_status() == 'processing' ) $order->update_status( 'pending' ); }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Hook to Custom Thank You Page’ is closed to new replies.