Automattic\WooCommerce\Internal\StockNotifications\Utilities
EligibilityService::is_stock_status_eligible
Check if a stock status is eligible for notifications.
Method of the class: EligibilityService{}
No Hooks.
Returns
true|false. True if the stock status is eligible for notifications, false otherwise.
Usage
$EligibilityService = new EligibilityService(); $EligibilityService->is_stock_status_eligible( $stock_status ): bool;
- $stock_status(string) (required)
- The stock status to check.
EligibilityService::is_stock_status_eligible() EligibilityService::is stock status eligible code WC 10.3.6
public function is_stock_status_eligible( string $stock_status ): bool {
return in_array( $stock_status, Config::get_eligible_stock_statuses(), true );
}