• Hi, with debug on, this appears on the post edit page.

    Notice: Function wc_get_order was called incorrectly. wc_get_order should not be called before post types are registered (woocommerce_after_register_post_type action) Backtrace: require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, WooCommerce->init, do_action(‘woocommerce_init’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Stripe_Manager->woocommerce_dependencies, WC_Stripe_Advanced_Settings->__construct, WC_Stripe_Settings_API->__construct, WC_Stripe_Advanced_Settings->init_form_fields, wc_get_order_statuses, apply_filters(‘wc_order_statuses’), WP_Hook->apply_filters, Marketkingcore_Admin->lock_composite_status, wc_get_order, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 2.5.) in /wp-includes/functions.php on line 6121

    Anything you guys can do to fix this error?

    Thanks…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @altometa

    Thank you for contacting Payment Plugins. The issue you’re seeing is not caused by the Stripe plugin. Your Marketingcore_Admin plugin is hooking into the filter wc_order_statuses and for some reason, it’s calling the function wc_get_order. That function should not be called before post types are registered.

    The function wc_get_order is provided by WooCommerce as a way to fetch an order using it’s ID. I am not sure why your Marketingcore_Admin plugin would be calling that function within the wc_order_statuses function.

    I recommend contacting their support team and showing them this support thread so they can investigate further.

    Kind Regards

    Thread Starter altometa

    (@altometa)

    Thank you. Looks like a conflict with the plugin, the Stripe plugin made by Automattic doesn’t show this error. It must be related to MarketKing’s Stripe Split pay built-in function. I’ll try to disable it and see what happens. Anyway, I’ll also reach out to them.

    Plugin Author Clayton R

    (@mrclayton)

    Hi @altometa

    Looks like a conflict with the plugin, the Stripe plugin made by Automattic doesn’t show this error. 

    That’s because the Stripe plugin by Automattic doesn’t support the same options that our plugin has. Our plugin has options for the WooCommerce order status which requires the function wc_get_order_statuses to be called.

    Kind Regards

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Notice: Function wc_get_order was called incorrectly’ is closed to new replies.