Support » Plugin: WooCommerce » Review option only for registered user

  • Resolved masurana

    (@masurana)


    Sir,
    Is there any way to create an option so that submit a review option only appear to the registered user?
    Please guide us. Thanks.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • There is option “Reviews can only be left by verified owners”

    in WooCommerce > Settings > Products tab
    check image please.

    https://pasteboard.co/HPR2JHy.jpg

    Thread Starter masurana

    (@masurana)

    Thanks. I missed to view this setting. Now it’s done.

    Bri

    (@tinnyfusion)

    Try this.

    // Remove the “Reviews” tab if the customer has not purchased this product
    /* ————————————- */
    add_filter( ‘woocommerce_product_tabs’, ‘ctmdesign_hide_tab_without_review’ );

    function ctmdesign_hide_tab_without_review( $tabs ) {
    global $product;

    if ( ! wc_customer_bought_product( ”, get_current_user_id(), $product->id ) ) {
    unset( $tabs[‘reviews’] );
    }
    return $tabs;
    }
    /* ————————————- */

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Review option only for registered user’ is closed to new replies.