• 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 82

    Notice: 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

    https://wordpress.org/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    If you look closely at the error you’re getting – you’ll notice this bit: vantage-child

    That means that your child theme is likely overriding several core WooCommerce templates with its own one. Are you seeing the same thing when switching to Twenty Sixteen?

    If not, I’d suggest getting in touch with your theme developers about that issue.

    Thread Starter ngrudev

    (@ngrudev)

    Yes, I’ve deleted that. Now it’s ok. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Use of undefined constant ‘woocommerce_thankyou’ – assumed’ is closed to new replies.