| Server IP : 3.93.235.159 / Your IP : 216.73.216.140 Web Server : Apache System : Linux ip-172-26-0-169 5.10.0-46-cloud-amd64 #1 SMP Debian 5.10.262-1 (2026-07-31) x86_64 User : bitnami ( 1000) PHP Version : 8.2.9 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/elementor-pro/modules/woocommerce/skins/ |
Upload File : |
<?php
namespace ElementorPro\Modules\WooCommerce\Skins;
use ElementorPro\Modules\LoopBuilder\Skins\Skin_Loop_Base;
use ElementorPro\Modules\LoopBuilder\Module as Loop_Module;
use ElementorPro\Modules\LoopBuilder\Widgets\Base as Loop_Widget_Base;
use ElementorPro\Modules\Woocommerce\Traits\Products_Trait;
use ElementorPro\Modules\Woocommerce\Module;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Loop Products
*
* Skin for Product queries in Loop widgets.
*
* @since 3.8.0
*/
class Skin_Loop_Product extends Skin_Loop_Base {
use Products_Trait;
public function get_id() {
return Module::LOOP_PRODUCT_SKIN_ID;
}
public function get_title() {
return esc_html__( 'Products', 'elementor-pro' );
}
public function render() {
$this->parent->add_render_attribute( '_wrapper', 'class', 'woocommerce' );
global $wp_query;
$wp_query->is_loop_product = true;
parent::render();
$wp_query->is_loop_product = null;
}
/**
* Register Query Controls
*
* Registers the controls for the query used by the Loop.
*
* @since 3.8.0
*/
public function register_query_controls( Loop_Widget_Base $widget ) {
$this->parent = $widget;
$this->add_query_controls( Loop_Module::QUERY_ID );
}
protected function render_post() {
global $product;
if ( ! $product instanceof \WC_Product ) {
$product = wc_get_product( get_the_ID() );
}
parent::render_post();
}
}