mirror of
https://github.com/proelements/proelements.git
synced 2026-04-05 20:13:47 +00:00
25 lines
505 B
PHP
25 lines
505 B
PHP
<?php
|
|
namespace ElementorPro\Modules\Woocommerce\Classes;
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit; // Exit if accessed directly
|
|
}
|
|
|
|
abstract class Base_Products_Renderer extends \WC_Shortcode_Products {
|
|
|
|
/**
|
|
* Override original `get_content` that returns an HTML wrapper even if no results found.
|
|
*
|
|
* @return string Products HTML
|
|
*/
|
|
public function get_content() {
|
|
$result = $this->get_query_results();
|
|
|
|
if ( empty( $result->total ) ) {
|
|
return '';
|
|
}
|
|
|
|
return parent::get_content();
|
|
}
|
|
}
|