Uname:Linux cp196.maytech.vn 5.14.0-687.66.2.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 6 16:20:31 EST 2026 x86_64

Base Dir : /home2/dlsafepha/public_html

User : dlsafepha


403WebShell
403Webshell
Server IP : 103.249.100.196  /  Your IP : 216.73.216.194
Web Server : Apache
System : Linux cp196.maytech.vn 5.14.0-687.66.2.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 6 16:20:31 EST 2026 x86_64
User : dlsafepha ( 1078)
PHP Version : 8.2.36
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/dlsafepha/./www/wp-content/plugins/woocommerce/src/Blocks/Utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/dlsafepha/./www/wp-content/plugins/woocommerce/src/Blocks/Utils/ProductAvailabilityUtils.php
<?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 );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit