26 lines
840 B
PHP
26 lines
840 B
PHP
<?php
|
|
/**
|
|
* WooCommerce content-product override — minimal, delegates to XShop product-card.
|
|
*
|
|
* Why override: Woo's default markup (li.product) is not grid/token aligned. This file
|
|
* keeps Woo loop logic (wc_product_class, hooks) but renders XShop card via
|
|
* template-parts/components/product-card. Keeps hooks for extensions.
|
|
*
|
|
* WC version tested: 11.1.0
|
|
* Template version: 3.6.0 (Woo)
|
|
*
|
|
* @see https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/templates/content-product.php
|
|
*/
|
|
|
|
defined('ABSPATH') || exit;
|
|
|
|
global $product;
|
|
|
|
if (empty($product) || !$product instanceof WC_Product) {
|
|
return;
|
|
}
|
|
?>
|
|
<li <?php wc_product_class('xshop-products__item', $product); ?>>
|
|
<?php get_template_part('template-parts/components/product-card', null, ['product' => $product, 'show_hooks' => false]); ?>
|
|
</li>
|