auth
5 years ago
cart
5 years ago
checkout
5 years ago
emails
5 years ago
global
6 years ago
loop
5 years ago
myaccount
5 years ago
notices
6 years ago
order
5 years ago
single-product
5 years ago
archive-product.php
6 years ago
content-product.php
5 years ago
content-product_cat.php
6 years ago
content-single-product.php
6 years ago
content-widget-price-filter.php
6 years ago
content-widget-product.php
7 years ago
content-widget-reviews.php
6 years ago
product-searchform.php
7 years ago
single-product-reviews.php
5 years ago
single-product.php
6 years ago
taxonomy-product_cat.php
6 years ago
taxonomy-product_tag.php
6 years ago
content-product.php
68 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The template for displaying product content within loops |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/content-product.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce/Templates |
| 15 | * @version 3.6.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | global $product; |
| 21 | |
| 22 | // Ensure visibility. |
| 23 | if ( empty( $product ) || false === wc_get_loop_product_visibility( $product->get_id() ) || ! $product->is_visible() ) { |
| 24 | return; |
| 25 | } |
| 26 | ?> |
| 27 | <li <?php wc_product_class( '', $product ); ?>> |
| 28 | <?php |
| 29 | /** |
| 30 | * Hook: woocommerce_before_shop_loop_item. |
| 31 | * |
| 32 | * @hooked woocommerce_template_loop_product_link_open - 10 |
| 33 | */ |
| 34 | do_action( 'woocommerce_before_shop_loop_item' ); |
| 35 | |
| 36 | /** |
| 37 | * Hook: woocommerce_before_shop_loop_item_title. |
| 38 | * |
| 39 | * @hooked woocommerce_show_product_loop_sale_flash - 10 |
| 40 | * @hooked woocommerce_template_loop_product_thumbnail - 10 |
| 41 | */ |
| 42 | do_action( 'woocommerce_before_shop_loop_item_title' ); |
| 43 | |
| 44 | /** |
| 45 | * Hook: woocommerce_shop_loop_item_title. |
| 46 | * |
| 47 | * @hooked woocommerce_template_loop_product_title - 10 |
| 48 | */ |
| 49 | do_action( 'woocommerce_shop_loop_item_title' ); |
| 50 | |
| 51 | /** |
| 52 | * Hook: woocommerce_after_shop_loop_item_title. |
| 53 | * |
| 54 | * @hooked woocommerce_template_loop_rating - 5 |
| 55 | * @hooked woocommerce_template_loop_price - 10 |
| 56 | */ |
| 57 | do_action( 'woocommerce_after_shop_loop_item_title' ); |
| 58 | |
| 59 | /** |
| 60 | * Hook: woocommerce_after_shop_loop_item. |
| 61 | * |
| 62 | * @hooked woocommerce_template_loop_product_link_close - 5 |
| 63 | * @hooked woocommerce_template_loop_add_to_cart - 10 |
| 64 | */ |
| 65 | do_action( 'woocommerce_after_shop_loop_item' ); |
| 66 | ?> |
| 67 | </li> |
| 68 |