2015-09-23 19:39:11 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2017-10-27 14:35:34 +00:00
|
|
|
* The template for displaying product widget entries.
|
|
|
|
*
|
2015-11-03 13:31:20 +00:00
|
|
|
* This template can be overridden by copying it to yourtheme/woocommerce/content-widget-product.php.
|
2016-02-12 11:28:41 +00:00
|
|
|
* HOWEVER, on occasion WooCommerce will need to update template files and you
|
|
|
|
* (the theme developer) will need to copy the new files to your theme to
|
|
|
|
* maintain compatibility. We try to do this as little as possible, but it does
|
|
|
|
* happen. When this occurs the version of the template file will be bumped and
|
|
|
|
* the readme will list any important changes.
|
2015-10-01 14:07:20 +00:00
|
|
|
*
|
2017-10-03 20:52:36 +00:00
|
|
|
* @see https://docs.woocommerce.com/document/template-structure/
|
2015-09-23 19:39:11 +00:00
|
|
|
* @package WooCommerce/Templates
|
2018-07-24 13:50:49 +00:00
|
|
|
* @version 3.5.0
|
2015-09-23 19:39:11 +00:00
|
|
|
*/
|
2015-09-23 20:13:26 +00:00
|
|
|
|
2015-09-23 19:39:11 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2017-10-27 14:35:34 +00:00
|
|
|
global $product;
|
2018-07-24 13:50:49 +00:00
|
|
|
|
|
|
|
if ( ! is_a( $product, 'WC_Product' ) ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-10-27 14:35:34 +00:00
|
|
|
?>
|
2013-05-13 14:12:12 +00:00
|
|
|
<li>
|
2017-10-27 14:35:34 +00:00
|
|
|
<?php do_action( 'woocommerce_widget_product_item_start', $args ); ?>
|
|
|
|
|
|
|
|
<a href="<?php echo esc_url( $product->get_permalink() ); ?>">
|
2018-07-24 13:50:19 +00:00
|
|
|
<?php echo wp_kses_post( $product->get_image() ); ?>
|
|
|
|
<span class="product-title"><?php echo esc_html( $product->get_name() ); ?></span>
|
2017-10-27 14:35:34 +00:00
|
|
|
</a>
|
|
|
|
|
2015-09-23 20:13:26 +00:00
|
|
|
<?php if ( ! empty( $show_rating ) ) : ?>
|
2018-07-24 13:50:19 +00:00
|
|
|
<?php echo wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) ); ?>
|
2015-09-23 20:13:26 +00:00
|
|
|
<?php endif; ?>
|
2017-10-27 14:35:34 +00:00
|
|
|
|
2018-07-24 13:50:19 +00:00
|
|
|
<?php echo wp_kses_post( $product->get_price_html() ); ?>
|
2017-10-27 14:35:34 +00:00
|
|
|
|
|
|
|
<?php do_action( 'woocommerce_widget_product_item_end', $args ); ?>
|
2015-09-23 19:39:11 +00:00
|
|
|
</li>
|