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.
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.
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).

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.
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.

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.
