CatalogVisibility.php
4 weeks ago
DefaultCustomerAddress.php
2 months ago
FeaturePluginCompatibility.php
4 weeks ago
OrderInternalStatus.php
4 weeks ago
OrderItemType.php
2 months ago
OrderStatus.php
4 weeks ago
PaymentGatewayFeature.php
7 months ago
ProductStatus.php
4 weeks ago
ProductStockStatus.php
4 weeks ago
ProductTaxStatus.php
1 year ago
ProductType.php
4 weeks ago
TaxBasedOn.php
2 months ago
CatalogVisibility.php
49 lines
| 1 | <?php |
| 2 | |
| 3 | declare( strict_types = 1 ); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Enums; |
| 6 | |
| 7 | /** |
| 8 | * Enum class for all the catalog visibility values. |
| 9 | */ |
| 10 | final class CatalogVisibility { |
| 11 | /** |
| 12 | * Product is visible on both shop and search results. |
| 13 | * |
| 14 | * @var string |
| 15 | */ |
| 16 | public const VISIBLE = 'visible'; |
| 17 | |
| 18 | /** |
| 19 | * Product is visible on the shop page only. |
| 20 | */ |
| 21 | public const CATALOG = 'catalog'; |
| 22 | |
| 23 | /** |
| 24 | * Product visible in the search results only. |
| 25 | */ |
| 26 | public const SEARCH = 'search'; |
| 27 | |
| 28 | /** |
| 29 | * Product is invisible on both shop and search results, but can still be accessed directly. |
| 30 | */ |
| 31 | public const HIDDEN = 'hidden'; |
| 32 | |
| 33 | /** |
| 34 | * Returns all catalog visibility values. |
| 35 | * |
| 36 | * @since 10.9.0 |
| 37 | * |
| 38 | * @return string[] |
| 39 | */ |
| 40 | public static function get_all(): array { |
| 41 | return array( |
| 42 | self::VISIBLE, |
| 43 | self::CATALOG, |
| 44 | self::SEARCH, |
| 45 | self::HIDDEN, |
| 46 | ); |
| 47 | } |
| 48 | } |
| 49 |