REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.49 KB
Close
/home/nshryvcy/taramarriagebureau.com/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; } // If the product is a variable product, check if it has any available variations. // We will show a custom availability message if it does. if ( $product->get_type() === ProductType::VARIABLE ) { $available_variations = $product->get_available_variations(); if ( empty( $available_variations ) && false !== $available_variations ) { $product_availability['availability'] = __( 'This product is currently out of stock and unavailable.', 'woocommerce' ); $product_availability['class'] = 'out-of-stock'; } } else { $product_availability = $product->get_availability(); } /** * Filters the product availability information. * * @since 9.7.0 * @param array $product_availability The product availability information. */ return apply_filters( 'woocommerce_product_availability', $product_availability ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 9
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--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BlocksWpQuery.php
2.08 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BlockTemplateUtils.php
30.98 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CartCheckoutUtils.php
13.66 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MiniCartUtils.php
3.51 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProductAvailabilityUtils.php
1.49 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProductGalleryUtils.php
6.43 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StyleAttributesUtils.php
22.13 KB
lrw-r--r--
2026-03-03 06:25:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Utils.php
1.21 KB
lrw-r--r--
2026-03-03 06:25:16
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).