HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/plugins/rey-core/inc/compatibility/dokan/TopRatedProduct.php
<?php
namespace ReyCore\Compatibility\Dokan;

use WeDevs\Dokan\Abstracts\DokanShortcode;

class TopRatedProduct extends DokanShortcode {
    protected $shortcode = 'dokan-top-rated-product';

    /**
     * Render top rated products via shortcode
     *
     * @param array $atts
     *
     * @return string
     */
    public function render_shortcode( $atts ) {

        /**
         * Filter return the number of top rated product per page.
         *
         * @since 2.2
         *
         * @param array
         */
        $per_page = shortcode_atts(
            apply_filters(
                'dokan_top_rated_product_per_page',
                [
                    'no_of_product' => 8,
                ],
                $atts
            ),
            $atts
        );

        ob_start();

		do_action( 'woocommerce_before_shop_loop' );

        woocommerce_product_loop_start();

            $best_selling_query = dokan_get_top_rated_products();

            while ( $best_selling_query->have_posts() ) {
                $best_selling_query->the_post();

                wc_get_template_part( 'content', 'product' );
            }

			wp_reset_postdata();

		woocommerce_product_loop_end();

		do_action( 'woocommerce_after_shop_loop' );

        return ob_get_clean();
    }
}