Automattic\WooCommerce\Internal\ProductFeed\Integrations\POSCatalog

POSProductVisibilitySync::is_product_supported │ public │ WC 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.

Метод класса: POSProductVisibilitySync{}

Хуков нет.

Возвращает

bool. True if the product type supports POS visibility.

Использование

$POSProductVisibilitySync = new POSProductVisibilitySync();
$POSProductVisibilitySync->is_product_supported( $product ): bool;
$product(WC_Product) (обязательный)
The product to check.

Список изменений

С версии 11.0.0 Введена.

Код POSProductVisibilitySync::is_product_supported() WC 11.2.2

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