automatewoo/includes/Variables/Product_Meta_Date.php
fei-source 47d3c9a8b6 Update to v6.2.2
Source: GrootMade/Festinger Vault
2026-03-15 08:31:15 +08:00

27 lines
537 B
PHP

<?php
namespace AutomateWoo;
use WC_Product;
defined( 'ABSPATH' ) || exit;
/**
* @class Variable_Product_Meta_Date
*/
class Variable_Product_Meta_Date extends Variable_Order_Meta_Date {
/**
* @param WC_Product $product
* @param array $parameters
* @return string|bool
*/
public function get_value( $product, $parameters ) {
if ( ! $parameters['key'] ) {
return false;
}
$value = Clean::string( $product->get_meta( $parameters['key'] ) );
return $this->format_datetime( $value, $parameters, true );
}
}