Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering WooCommerce

You're reading from   Mastering WooCommerce Build, customize, and launch a complete e-commerce website with WooCommerce from scratch

Arrow left icon
Product type Paperback
Published in Apr 2024
Publisher Packt
ISBN-13 9781835085288
Length 352 pages
Edition 2nd Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Patrick Rauland Patrick Rauland
Author Profile Icon Patrick Rauland
Patrick Rauland
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Exploring the essentials of an ECommerce Store
2. Chapter 1: Installing WordPress and WooCommerce FREE CHAPTER 3. Chapter 2: All About Configuring Products 4. Chapter 3: Organizing Products 5. Chapter 4: Attracting Traffic with Search Engine Optimization 6. Part 2: Managing an Online Store
7. Chapter 5: Managing Sales Through WP Admin 8. Chapter 6: Syncing Product Data 9. Chapter 7: Configuring In-Store POS Solutions 10. Chapter 8: Using Fulfillment Software 11. Chapter 9: Speeding Up Your Store 12. Part 3: Customizing the Appearance and Functionality of Your Store
13. Chapter 10: Setting Up Your Theme 14. Chapter 11: Customizing the Product Page 15. Chapter 12: Building a Landing Page 16. Chapter 13: Creating Plugins for WooCommerce 17. Chapter 14: Next Steps with WooCommerce 18. Index 19. Other Books You May Enjoy

Customizing order statuses

WooCommerce uses order statuses to track the state of orders. WooCommerce includes several different order statuses, including the following:

  • Completed
  • Processing
  • Pending payment
  • On hold
  • Refunded
  • Canceled
  • Failed

But some shops may need more order statuses. You might need a Building status to indicate that you started building the order. You can easily add a custom order status yourself with some custom code. We’re going to start with our WooCommerce example plugin and then we’re going to register a post status and add it to WooCommerce.

Using the WooCommerce example plugin

We can start by using the example plugin we created earlier in this chapter.

We’ll copy the example code, and then we should change the name of the class from WC_Example to WC_Building_Order_Status, since this describes what this plugin will do. Here’s the code:

// only run if there's no other class with...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime