View Categories

Hooks and Filters Reference

This reference lists the actions and filters exposed by Additional Custom Order Status for WooCommerce, verified against the plugin source. Use them to customize behavior from your own code.

Filters #

Filter Arguments Purpose
wfwp_wc_order_status_options $options Filters the per-status option boxes and fields shown on the status edit screen.
wfwp_wc_order_status_email_content $content, $order_id, $status_from, $status_to, $order Filters the email body before placeholders are replaced (Pro).
wfwp_wc_order_status_wc_email $use_wc_email (bool, default true) Return false to send status emails with the legacy direct method instead of the WooCommerce WC_Email classes (Pro).
wfwp_wc_order_status_custom_sorting_status $status, $data_type Filters each status slug as it is matched during custom sorting.
wfwp_wc_order_status_settings $value, $type, $args Internal gating filter used to enable the Email Options in the Pro build. Not intended for general use.

Actions #

Action Arguments Fires when
wfwp_wc_order_status_core_loaded $core The core class has finished loading. Passes the core instance.
wfwp_wc_order_status_settings_saved $current_section The plugin’s settings tab is saved. Passes the current section id.

Example: append text to every status email #

add_filter( 'wfwp_wc_order_status_email_content', function ( $content, $order_id, $status_from, $status_to, $order ) {
    return $content . '<p>Thank you for shopping with us.</p>';
}, 10, 5 );

Example: run code after the plugin core loads #

add_action( 'wfwp_wc_order_status_core_loaded', function ( $core ) {
    // $core is the WFWP_WC_Order_Status_Core instance.
} );

Note: per-status option values are stored as post meta on the wfwp_wc_order_status post type, using the option id prefixed with an underscore, for example _text_color. Global settings are stored as options such as wfwp_wc_order_status_sorting.

Need a hand? #

Our team answers every developer question on the Custom Order Status support forum.