Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

POSProductVisibilitySync::is_product_supportedpublicWC 11.0.0

Whether POS visibility can be managed for the given product.

Only simple and variable products that are not downloadable support the "Available for POS" option; this is the single definition used by both the product data meta box UI and the save logic.

Method of the class: POSProductVisibilitySync{}

No Hooks.

Returns

true|false. True if the product type supports POS visibility.

Usage

$POSProductVisibilitySync = new POSProductVisibilitySync();
$POSProductVisibilitySync->is_product_supported( $product ): bool;
$product(WC_Product) (required)
The product to check.

Changelog

Since 11.0.0 Introduced.

POSProductVisibilitySync::is_product_supported() code WC 11.0.0

public function is_product_supported( \WC_Product $product ): bool {
	return $product->is_type( array( ProductType::SIMPLE, ProductType::VARIABLE ) ) && ! $product->is_downloadable();
}