Your plug in is very useful and works ok at the front end but generates a load of errors at the back end – it is the same error repeated 20 times.
This is the error message in the log:
[19-Apr-2017 14:51:32 UTC] order_number_new was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Gateway_BACS->process_payment, WC_Order->update_status, WC_Order->save, WC_Order->status_transition, do_action(‘woocommerce_order_status_pending_to_on-hold’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Emails::send_transactional_email, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WC_Email_New_Order->trigger, WC_Order->get_order_number, apply_filters(‘woocommerce_order_number’), WP_Hook->apply_filters, call_user_func_array, WC_EZOSC_Seq_Order_Number->get_order_number, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
]]>Hi how do you reset the order number to start at say 1000?
]]>