• Skip to primary navigation
  • Skip to main content
LogoMain
WP Desk

WP Desk

WooCommerce Plugins

Flexible Invoices

Flexible Invoices

Automate invoicing

ShopMagic

ShopMagic

E-mail automations

Flexible Coupons

  • Pricing
  • Add-ons
  • Docs
  • Support
  • Blog
  • Ideas
  • My Account
How to Trigger a WooCommerce Certificate on a Custom Order Status (Not Just “Completed”)

Published: 2026-07-30 / Updated: 2026-08-14 / Blog, Plugin Tutorials

How to Trigger a WooCommerce Certificate on a Custom Order Status (Not Just “Completed”)

Patrycja Wojas

If you sell online courses or in-person trainings, you’ve probably run into a timing problem with certificates: WooCommerce’s default statuses don’t match how your business actually works. An order can be marked “Completed” the moment payment clears – long before the student has actually finished the course. Sending a certificate at that point doesn’t make sense; you’d be awarding completion for something that hasn’t happened yet.

This article extends the setup described in our guide on building a WooCommerce PDF Certificate Generator with Flexible Product Fields PRO and Flexible Coupons PRO. If you haven’t configured custom fields, PDF templates, and shortcodes yet, start there first – this article only covers the trigger, not the certificate design itself.

Why “Order Completed” isn’t the right trigger for training certificates

For a physical product, “Completed” usually means “shipped” or “delivered” – a clear, single moment. For a course or training, there are actually two separate moments that matter: the order itself (payment received, access granted) and the actual completion of the training (the student finished the material, passed the exam, attended all sessions). Using the same status for both means either sending certificates too early, or manually tracking who’s actually finished and generating certificates by hand – which defeats the purpose of automation.

The fix is to add a dedicated order status, like “Training Completed,” that you (or an instructor) set manually once the student has genuinely finished, and use that new status – not the default “Completed” – as the trigger for certificate generation.

Want to read more about setting up custom fields, designing PDF templates, and connecting them with shortcodes? Check out our full guide: WooCommerce PDF Certificate Generator for Charity & Courses on the Flexible Coupons blog.

Step 1: Add a custom order status to WooCommerce

WooCommerce doesn’t offer a way to add custom order statuses through the admin panel – this requires a small code snippet added to your theme’s functions.php (or a code snippets plugin).

Select alternative order status

Here’s a working example that adds a “Packing in progress” status right after “Processing” in the order list:


function get_custom_order_status_settings() {
    return array(
        // Status ID (slug). Must start with "wc-", lowercase, no spaces.
        'slug'       => 'wc-packing',
        // Status Name shown in the admin panel and to the customer.
        'label'      => 'Packing in progress',
    );
}

add_action( 'init', 'register_custom_order_status' );
function register_custom_order_status() {
    $settings = get_custom_order_status_settings();
    register_post_status( $settings['slug'], array(
        'label'                     => $settings['label'],
        'public'                    => true,
        'exclude_from_search'       => false,
        'show_in_admin_all_list'    => true,
        'show_in_admin_status_list' => true,
        'label_count'               => _n_noop( $settings['label'] . 
' <span class="count">(%s)</span>', $settings['label'] . ' <span class="count">(%s)</span>' )
    ) );
}

add_filter( 'wc_order_statuses', 'add_custom_status_to_wc_list' );
function add_custom_status_to_wc_list( $order_statuses ) {
    $settings = get_custom_order_status_settings();
    $new_order_statuses = array();
    foreach ( $order_statuses as $status_id => $status_name ) {
        $new_order_statuses[ $status_id ] = $status_name;
        if ( 'wc-processing' === $status_id ) {
            $new_order_statuses[ $settings['slug'] ] = $settings['label'];
        }
    }
    return $new_order_statuses;
}

For a training certificate workflow, simply change the two values at the top: set ‘slug’ => ‘wc-training-completed’ and ‘label’ => ‘Training Completed’. That’s the only thing you need to adjust – the rest of the code works as-is.

Optional: if you want the new status to stand out visually in the order list with its own color instead of the default gray, add the styling snippet with bg_color and text_color settings – see the full version in our documentation.

Once added, the new status appears in the order status dropdown and in the order list filters, just like any built-in WooCommerce status – as shown below.

The custom “Training Completed” status appears in the order list and status dropdown, right alongside WooCommerce’s default statuses.

Step 2: Use the new status as the certificate trigger in Flexible Coupons PRO

This is the part that makes the whole workflow click into place – and it requires no additional code. In Flexible Coupons PRO’s settings, you choose which order status triggers automatic PDF generation and sending. Since your new “Training Completed” status is now a fully registered WooCommerce status, it will appear in that same dropdown.

Go to Coupons PDF → Settings and select “Training Completed” (or whatever label you chose) as the status for auto-generation, instead of the default “Completed.” From this point on, the certificate PDF – built with the custom fields and template you configured following our main certificate guide – will only be generated and emailed once you (or your team) manually move the order to “Training Completed,” not the moment the order is paid for.

Pdf Certificate

A simple two-step workflow for course providers

Put together, the full flow looks like this: a customer buys a course, the order moves through the normal WooCommerce statuses (Processing, then typically Completed once access is granted). Separately, once the student actually finishes the training – passes the final quiz, attends the last session, whatever your definition of “done” is – a team member manually changes the order status to “Training Completed.” That status change is what fires the certificate. No premature certificates, no manual PDF creation, and no need to touch the code again after the initial setup.

FAQ

Can I use a custom order status as a trigger without writing any code?
No. WooCommerce doesn’t expose custom order statuses through its admin interface, so registering a new status always requires a small snippet in functions.php or a code snippets plugin. Once registered, though, using it as a trigger in Flexible Coupons PRO requires no further coding – it’s a dropdown selection.

Will the custom order status affect existing automations, like ShopMagic emails?
Not unless you configure it to. Since the new status is a standard WooCommerce status once registered, you can optionally use it as a trigger event in ShopMagic automations too, but it won’t interfere with your existing automations tied to other statuses like “Completed” or “Processing.”

Can I have multiple custom statuses for different certificate types?
Yes. You can register several custom statuses (for example, “Course A Completed” and “Course B Completed”) using the same snippet pattern with different slugs and labels, and assign each product’s certificate settings to trigger on the relevant one.

About Patrycja Wojas

Master's degree in Finance and Accounting. In love with marketing — and it's mutual — since the age of 18.

Espresso in the morning is non-negotiable, dark humor comes standard — boring people with no passion or sense of humor can keep walking, there's no room for them in her life.

A few truths: 400 horsepower under the hood instead of silence, a shovel in hand instead of a gym membership, home office from any corner of the world, and a nephew she gives her whole heart to.

  • Terms & Conditions
  • Privacy Policy
  • Support Policy
  • Refund Policy

© 2026 WP Desk WP Desk & Flexible Coupons

Manage Consent

We use necessary cookies to make our site work. We'd also like to set additional cookies to understand site usage, enhance your browsing experience, and serve personalized ads or content. By clicking ‘Accept All,’ you consent to our use of additional cookies.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}