Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Hide option of Hide map in vendor setting
- This topic has 7 replies, 2 voices, and was last updated 4 years, 8 months ago by memoryengravers.
- AuthorPosts
- March 5, 2020 at 1:56 am #110039memoryengraversParticipant
Hello,
I am trying to hide the Hide option of Hide map in vendor setting.. previously I found this:
add_filter( 'wcfm_is_allow_store_map_location', '__return_false' );
but this did not work.
- March 5, 2020 at 11:59 am #110063Sarmistha ChakrabortyMember
Hello,
Yes using this you can hide location map from vendor settings. Can you tell where you add this code? Or you can share your site details then we can check your site.
Thanks.
- March 5, 2020 at 1:52 pm #110074memoryengraversParticipant
I added it to the functions.php of my child theme, where should it go ?
- March 5, 2020 at 2:49 pm #110077Sarmistha ChakrabortyMember
Hello,
For removing “location map” setting form vendor settings(PFA), yes
add_filter( 'wcfm_is_allow_store_map_location', '__return_false' );
this code you have to write in your activate theme’s functions.php. you can share your site details then we can check your site.Thanks.
Attachments:
You must be logged in to view attached files.
- March 6, 2020 at 1:56 am #110151memoryengraversParticipant
Sorry, I communicated the wrong section. It is under the Vendor’s account, profile, I would like to remove these 3 options so the vendor can not change the settings:
- March 6, 2020 at 4:11 am #110182memoryengraversParticipant
trying to post image again
img link - March 6, 2020 at 12:33 pm #110221Sarmistha ChakrabortyMember
Hello,
For hiding “Hide Map from Store” settings,
add_filter( 'wcfm_marketplace_settings_fields_visibility', function( $fiels, $vendor_id ) { unset($fiels['store_hide_map']); return $fiels; }, 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/Thanks.
- March 7, 2020 at 2:43 am #110347memoryengraversParticipant
That worked perfectly, Thank you !!
- AuthorPosts
- The topic ‘Hide option of Hide map in vendor setting’ is closed to new replies.