REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.26 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/woocommerce/src/Blocks/Utils/ProductAvailabilityUtils.php
Text
Base64
<?php declare(strict_types=1); namespace Automattic\WooCommerce\Blocks\Utils; use Automattic\WooCommerce\Blocks\Templates\ProductStockIndicator; use Automattic\WooCommerce\Enums\ProductType; /** * Utility functions for product availability. */ class ProductAvailabilityUtils { /** * Get product availability information. * * @param \WC_Product $product Product object. * @return string[] The product availability class and text. */ public static function get_product_availability( $product ) { $product_availability = array( 'availability' => '', 'class' => '', ); if ( ! $product ) { return $product_availability; } $product_availability = $product->get_availability(); // If the product is a variable product, make sure at least one of its // variations is purchasable. if ( isset( $product_availability['class'] ) && ( 'in-stock' === $product_availability['class'] || 'available-on-backorder' === $product_availability['class'] ) && ProductType::VARIABLE === $product->get_type() ) { if ( ! $product->has_purchasable_variations() ) { $product_availability['availability'] = __( 'Out of stock', 'woocommerce' ); $product_availability['class'] = 'out-of-stock'; } } return $product_availability; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
BlockHooksTrait.php
6.89 KB
lrw-r--r--
2024-07-30 19:31:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BlocksSharedState.php
6.86 KB
lrw-r--r--
2026-03-30 17:12:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BlocksWpQuery.php
2.08 KB
lrw-r--r--
2023-12-27 00:45:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BlockTemplateUtils.php
30.09 KB
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CartCheckoutUtils.php
17.33 KB
lrw-r--r--
2026-05-05 14:26:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MiniCartUtils.php
3.51 KB
lrw-r--r--
2024-11-14 01:17:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProductAvailabilityUtils.php
1.26 KB
lrw-r--r--
2025-07-29 12:34:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProductDataUtils.php
455 B
lrw-r--r--
2025-06-23 19:46:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProductGalleryUtils.php
5.75 KB
lrw-r--r--
2026-03-30 17:12:24
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StyleAttributesUtils.php
23.12 KB
lrw-r--r--
2025-05-12 21:07:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Utils.php
1.21 KB
lrw-r--r--
2023-12-27 00:45:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).