Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Default country in store filter search
- This topic has 1 reply, 2 voices, and was last updated 4 years, 6 months ago by Sushobhan.
Viewing 1 reply thread
- AuthorPosts
- April 27, 2020 at 9:14 pm #123789t.bryParticipant
Hi,
Is there a way to add a default country in the store search widget ‘store list : location filter’ and to hide the country dropdown menu ?
Thanks a lot
- April 28, 2020 at 4:23 pm #124187SushobhanKeymaster
Hello,
You can use this hack to do so, thought setting $_GET like this is not considered as good practice.add_action( 'wcfmmp_store_lists_before_sidebar_location_filter', function() { if ( ! isset( $_GET['wcfmmp_store_country'] ) ) { $_GET['wcfmmp_store_country'] = 'IN'; // Change it to any country you like (Two letter country code) } add_filter( 'wcfmmp_is_allow_store_list_country_filter', '__return_false' ); } );
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/
Let me know how this goes.
Thanks!
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.