How Zomato Turned Food Delivery into a Digital Phenomenon Introduction...
Read NowThere are no pre-requisites for this code snippet to work. Keep in mind this solution consists of two code snippets, one to display the content and one to style it.
Add these two code snippets as separate entries in either your active child theme’s functions.php file or the Code Snippets plugin.
Creating a custom order status in WooCommerce can be beneficial if your business processes involve extra steps. You might want to set a custom order status like “Dispatched”, “Exchanged”, or “Being Picked”. With this code snippet, you can create any custom status you need to suit your business and customer requirements.
/** * Snippet Name: Create custom WooCommerce order statuses. * Snippet Author: Nevercrox Solutions */ add_filter( 'woocommerce_register_shop_order_post_statuses', 'nevercrox_register_custom_order_status' ); function nevercrox_register_custom_order_status( $order_statuses ){ $order_statuses['wc-custom-status'] = array( 'label' => _x( 'Custom Status', 'Order status', 'woocommerce' ), 'public' => false, 'exclude_from_search' => false, 'show_in_admin_all_list' => true, 'show_in_admin_status_list' => true, 'label_count' => _n_noop( 'Custom Status <span class="count">(%s)</span>', 'Custom Status <span class="count">(%s)</span>', 'woocommerce' ), ); return $order_statuses; } add_filter( 'wc_order_statuses', 'nevercrox_show_custom_order_status' ); function nevercrox_show_custom_order_status( $order_statuses ) { $order_statuses['wc-custom-status'] = _x( 'Custom Status', 'Order status', 'woocommerce' ); return $order_statuses; } add_filter( 'bulk_actions-edit-shop_order', 'nevercrox_get_custom_order_status_bulk' ); function nevercrox_get_custom_order_status_bulk( $bulk_actions ) { $bulk_actions['mark_custom-status'] = 'Change status to custom status'; return $bulk_actions; } ?>
How Zomato Turned Food Delivery into a Digital Phenomenon Introduction...
Read NowAmul’s Success Story Introduction Amul is one of India’s most...
Read Now