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 5 years, 1 month ago by
memoryengravers.
- AuthorPosts
- March 5, 2020 at 1:56 am #110039
memoryengravers
ParticipantHello,
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 #110063
Sarmistha Chakraborty
MemberHello,
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 #110074
memoryengravers
ParticipantI added it to the functions.php of my child theme, where should it go ?
- March 5, 2020 at 2:49 pm #110077
Sarmistha Chakraborty
MemberHello,
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 #110151
memoryengravers
ParticipantSorry, 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 #110182
memoryengravers
Participanttrying to post image again
img link - March 6, 2020 at 12:33 pm #110221
Sarmistha Chakraborty
MemberHello,
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 #110347
memoryengravers
ParticipantThat worked perfectly, Thank you !!
- AuthorPosts
- The topic ‘Hide option of Hide map in vendor setting’ is closed to new replies.