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

32 lines
597 B
PHP

<?php
namespace AutomateWoo;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* @class Variable_Product_Featured_Image
*/
class Variable_Product_Featured_Image extends Variable {
/**
* Load admin details
*/
public function load_admin_details() {
$this->description = __( "Displays the product's featured image.", 'automatewoo' );
}
/**
* Get the value of this variable.
*
* @param \WC_Product $product
* @param mixed $parameters
* @return string
*/
public function get_value( $product, $parameters ) {
return $product->get_image( 'woocommerce_thumbnail' );
}
}