WPITECHWPITECH

    Subscribe to Updates

    Get Latest WordPress Tutorials and Updates

    What's Hot

    12 Best Ecommerce Software in 2021 & in the Future

    July 31, 2021

    Why Is My Canon Printer Not Printing Properly?

    July 31, 2021

    5 Best Google Analytics Plugins

    May 28, 2021
    Facebook Twitter Instagram
    Facebook Twitter Instagram
    WPITECH WPITECH
    Subscribe
    • Home
    • Tutorials
      • WordPress Tutorials
      • WordPress Plugin
      • WordPress Themes
      • WooCommerce
      • Ecommerce
      • PHP
    • Hosting
    • Deals
      • Hosting Deals
    • SEO TOOLS
      • Bulk Url Checker
      • Structured Data
      • Google Cache
      • Hyperlink Generator
      • Free URL Checker
    • Marketing
      • SEO
      • Advertising
    • Reviews
    • Write for Us
    • About Us
    WPITECHWPITECH
    Home » How To Add WooCommerce Custom Order Status
    WooCommerce

    How To Add WooCommerce Custom Order Status

    WPITECHBy WPITECHOctober 2, 2019No Comments2 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    How to create WooCommerce custom order status
    Share
    Facebook Twitter LinkedIn Pinterest Email

    WooCommerce orders go through several steps from the initial process to final checkout. In order to simplify this complex process for order tracking, WooCommerce offers order statuses to make a proper flow of orders. These are the seven WooCommerce order statuses.

    1. Completed
    2. Processing
    3. Pending payment
    4. On hold
    5. Refunded
    6. Cancelled
    7. Failed

    How to Add WooCommerce Custom Order Status

    1. Registering New Custom Order Status
    2. Add New Custom Order Statuses to WooCommerce

    All of these WooCommerce order statuses trigger actions that describe the online store’s business logic for a particular order status.

    The best thing is that you could define your own custom order status and add custom code so that the online store take right action in order to the selection of the custom status. Here I am going to add a custom order status “Shipping In Progress”.

    Add the following code snippets into functions.php file located in the theme folder.:

    Registering New Custom Order Status

    function wpitech_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', 'wpitech_wc_register_post_statuses' );

    Add New Custom Order Statuses to WooCommerce

    function wpitech_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', 'wpitech_wc_add_order_statuses' );
    

    Here is the preview of how the custom order status would look in action:

    How custom order status look like

    The wpitech_wc_add_order_statuses() function adds a new custom post status that is known as order status in the list of available order statuses within the WooCommerce Orders pages.

     

    How to create WooCommerce custom order status WooCommerce Custom Order Status
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    WPITECH

    Related Posts

    5 Best WooCommerce Affiliate Plugins

    January 3, 2020

    How to Customize Add to Cart Button in WooCommerce

    October 21, 2019

    How to Customize WooCommerce Product Variations

    October 13, 2019
    Add A Comment

    Leave A Reply Cancel Reply

    Recent Posts
    • 12 Best Ecommerce Software in 2021 & in the Future
    • Why Is My Canon Printer Not Printing Properly?
    • 5 Best Google Analytics Plugins
    • 12 Best Email List Building Tools in 2021
    • 9 Amazing Benefits of Using WordPress for Your Projects
    Recent Comments
    • 20+ Top Ecommerce Marketing Agencies To Hire for 2020 on Conversion Rate Optimization Tips to Improve Conversions and Increase Revenue
    • Hottest B2B Content Marketing Trends and Statistics in 2019 on The Ultimate Guide to Broken Link Building 2020
    • Digital Chetan on SEO 2020 Google RankBrain Algorithm GUIDE
    Editors Picks
    Top Reviews
    Advertisement
    Demo
    Facebook Twitter Instagram Pinterest Vimeo YouTube
    • Home
    © 2022 All rights reserved

    Type above and press Enter to search. Press Esc to cancel.