default.php
25 lines
| 1 | <?php |
| 2 | |
| 3 | use ShopEngine\Utils\Helper; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | ?> |
| 8 | <div class="shopengine-product-excerpt"> |
| 9 | |
| 10 | <div class="woocommerce-product-details__short-description"> |
| 11 | <?php |
| 12 | $product = \ShopEngine\Widgets\Products::instance()->get_product(get_post_type()); |
| 13 | $post = get_post($product->get_id()); |
| 14 | $short_description = apply_filters('woocommerce_short_description', $post->post_excerpt); |
| 15 | |
| 16 | if(!$short_description && get_post_type() == \ShopEngine\Core\Template_Cpt::TYPE) { |
| 17 | echo esc_html__('Dummy short description only for elementor preview mode if and only if the editor selected product has no short description.', 'shopengine'); |
| 18 | } else { |
| 19 | echo wp_kses($short_description, Helper::get_kses_array()); |
| 20 | } |
| 21 | |
| 22 | ?> |
| 23 | </div> |
| 24 | |
| 25 | </div> |