feat: implement WooCommerce storefront foundation
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user