Automattic\WooCommerce\Internal\Admin
Settings::get_default_excluded_order_statuses
The default order statuses excluded from Analytics report totals, before a merchant saves the option. Single source of truth for the Settings UI and every runtime consumer, so the filtered value applies everywhere without saving the option.
Метод класса: Settings{}
Возвращает
array.
Использование
$result = Settings::get_default_excluded_order_statuses(): array;
Список изменений
| С версии 11.2.0 | Введена. |
Код Settings::get_default_excluded_order_statuses() Settings::get default excluded order statuses WC 11.2.2
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 );
}