Use of undefined constant ‘woocommerce_thankyou’ – assumed
-
Hi,
On some pages I have this PHP Notice:
Notice: Use of undefined constant ‘woocommerce_thankyou’ – assumed ‘‘woocommerce_thankyou’’ in /home/lugabglj/public_html/test/bg_wp/wp-content/themes/vantage-child/functions.php on line 82Notice: Use of undefined constant ‘custom_woocommerce_auto_complete_order’ – assumed ‘‘custom_woocommerce_auto_complete_order’’ in /home/lugabglj/public_html/test/bg_wp/wp-content/themes/vantage-child/functions.php on line 82
On line 82 i have this code for changing default order status on this line:
add_action( ‘woocommerce_thankyou’, ‘custom_woocommerce_auto_complete_order’ );
The whole code is:
//* Reset status of new orders from "on-hold" to "processing" */ add_action( ‘woocommerce_thankyou’, ‘custom_woocommerce_auto_complete_order’ ); function custom_woocommerce_auto_complete_order( $order_id ) { global $woocommerce; if ( !$order_id ) return; $order = new WC_Order( $order_id ); $order->update_status( ‘processing’ ); }
Why I get this error and how to resolve it? May be some modifications of the code?
Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Use of undefined constant ‘woocommerce_thankyou’ – assumed’ is closed to new replies.