hide "Enable reviews" option at Advanced tab for Vendors only?

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate hide "Enable reviews" option at Advanced tab for Vendors only?

Viewing 5 reply threads
  • Author
    Posts
    • #82039
      Makers
      Participant

      Hello WC Lovers!

      Is there any way to hide the “Enable reviews” option at Advanced tab for Vendors only? (Image attached) So that Admins would still have the option to enable reviews when they add their own products, but vendors will not be able to.

      I’ve turned off the Store Reviews module and reviews in the menu manager, but the option is still there. I’m not sure if I’m missing this option somewhere though?

      Thank you for your assistance!

      Attachments:
      You must be logged in to view attached files.
    • #82453
      WCFM Forum
      Member

      Hi,

      Store Reviews is not related to this.

      Please add this code to your site for the purpose –

      add_filter( 'wcfm_product_manage_fields_advanced', function( $advance_fields, $product_id ) {
      	$advance_fields = wcfm_hide_field( 'enable_reviews', $advance_fields );
      	return $advance_fields;
      }, 50, 2 );

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/

      Thank You

    • #82539
      Makers
      Participant

      Thank you for this it seems to work great for this purpose.

      The only other thing I’d also like to be able to do would be… By default have enable reviews unchecked when they add a new product. Since they currently don’t see the option because we added the code above and it’s enabled/checked by default. I understand if this isn’t something you can assist me with.

      I appreciate your help very much!

      Thank you!

    • #82825
      WCFM Forum
      Member

      Well, this use this revised code –

      add_filter( 'wcfm_product_manage_fields_advanced', function( $advance_fields, $product_id ) {
      	$advance_fields = wcfm_hide_field( 'enable_reviews', $advance_fields );
      	if( !$product_id && isset( $advance_fields['enable_reviews'] ) ) {
      		$advance_fields['enable_reviews']['dfvalue'] = '';
      	}
      	return $advance_fields;
      }, 50, 2 );

      Thank You

    • #82837
      Makers
      Participant

      Works perfect!

      Thank you very much!

    • #82944
      WCFM Forum
      Member

      Great 🙂

Viewing 5 reply threads
  • The topic ‘hide "Enable reviews" option at Advanced tab for Vendors only?’ is closed to new replies.