• Resolved emanuel123456

    (@emanuel123456)


    Hello there,

    We need your help ?? I tried many chatGPT php codes, but still same wrong result.

    We need show all reviews on new product tab. So ..I add code for new tab + add short code [cusrev_all_reviews] for all reviews (on standard page works ok – show all reviews for all product)

    But somehow on product tab [cusrev_all_reviews] show only reviews of product from this product page. :/

    I tride add long shordcode with all atributes [cusrev_all_reviews …….] but same result. Only reviews of product where is this review tab placed (on product).

    Show case of php code:

    function custom_add_product_tab($tabs) {
    // P?idání nové karty
    $tabs[‘recenzie_actimaris’] = array(
    ‘title’ => __(‘Recenzie ActiMaris’, ‘your-text-domain’),
    ‘priority’ => 50, // Pou?ijte vy??í ?íslo pro umístění karty jako p?edposlední
    ‘callback’ => ‘custom_product_tab_content’
    );

    // Se?azení karet podle priority
    uasort($tabs, function($a, $b) {
        return $a['priority'] <=> $b['priority'];
    });
    
    return $tabs;

    }

    function custom_product_tab_content() {
    echo do_shortcode(‘[cusrev_all_reviews]’);
    }

    add_filter(‘woocommerce_product_tabs’, ‘custom_add_product_tab’);

    Thank you for your help

    Emanuel

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support pear8398

    (@pear8398)

    Hi,

    Thank you for using CusRev.

    By default, the all reviews shortcode will display reviews of the current product. If you want to display reviews of all products, you set the attribute products="". For example:
    [cusrev_all_reviews products=""]

    products parameter accepts “current” or a comma-separated list of product IDs. Use this parameter to show reviews of the current product only or reviews corresponding to product IDs from the comma-separated list. If you provide an empty list of product IDs like "", the shortcode will display reviews of all products.

    Please go to Reviews > Settings > Shortcodes tab, to get more details.

    Plugin Support bagel1317

    (@bagel1317)

    We haven’t heard from you for more than two weeks. For this reason, I’ll assume that either you are not interested in this question/problem anymore or it has been resolved. If you still require any help, please start a new forum topic

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.