Automattic\WooCommerce\Internal\Admin
Settings::get_default_excluded_order_statuses
The default order statuses excluded from Analytics report totals, used until a merchant saves a different selection. Single source of truth for the Settings UI and every runtime consumer, so the filtered value applies everywhere without saving the option.
Method of the class: Settings{}
Hooks from the method
Returns
array.
Usage
$result = Settings::get_default_excluded_order_statuses(): array;
Changelog
| Since 11.2.0 | Introduced. |
Settings::get_default_excluded_order_statuses() Settings::get default excluded order statuses code WC 11.3.0
public static function get_default_excluded_order_statuses(): array {
$builtin_default = array( OrderStatus::PENDING, OrderStatus::CANCELLED, OrderStatus::FAILED );
/**
* Filters the default set of order statuses excluded from Analytics report totals.
*
* @since 11.2.0
*
* @param array $default_statuses Default excluded order statuses.
*/
$filtered = apply_filters( 'woocommerce_analytics_settings_default_excluded_order_statuses', $builtin_default );
return self::get_valid_order_statuses_or_default( $filtered, $builtin_default );
}