Add custom order status to woocommerce
-
Hi everybody, this is my first post on this forum and i hope someone can help me out???
I’m trying to add a custom order status to woocommerce, i found the following script online and added it to functions.php
function wpblog_wc_register_post_statuses() { register_post_status( 'wc-shipping-progress', array( 'label' => _x( 'Shipping In Progress', 'WooCommerce Order status', 'text_domain' ), 'public' => true, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop( 'Approved (%s)', 'Approved (%s)', 'text_domain' ) ) ); } add_filter( 'init', 'wpblog_wc_register_post_statuses' );
function wpblog_wc_add_order_statuses( $order_statuses ) { $order_statuses['wc-shipping-progress'] = _x( 'Shipping In Progress', 'WooCommerce Order status', 'text_domain' ); return $order_statuses; } add_filter( 'wc_order_statuses', 'wpblog_wc_add_order_statuses' );
It does add the new order status on my backend list, but when i select the status and update the order, it wont apply it, status remains the same as it was before.
Any idea on how to fix this? Thanks in advance!
- The topic ‘Add custom order status to woocommerce’ is closed to new replies.