Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Remove all Shipping State Blocks at once?
- This topic has 4 replies, 2 voices, and was last updated 5 years, 1 month ago by
Janneke.
- AuthorPosts
- March 15, 2020 at 3:10 pm #111656
Janneke
ParticipantHi,
In Vendor Shipping OPtions I don’t want options voor State rates but only Country.
I succesfully removed one Shipping State Block in CSS >
div#wcfmmp_shipping_rates_wcfmmp_shipping_state_rates_0 { display: none; }
But as soon the vendor wants to add another country then a second Shipping State Block appears.
To remove that second Block I have to add in CSS >div#wcfmmp_shipping_rates_wcfmmp_shipping_state_rates_2 { display: none;
Ans so on for every new added country so if vendor ships to 100 countries I have to put 100 codes in CSS(?)
Is here another way to hide or remove this Shipping State Blocks at once?
Please see attachment.
Thank you.
Attachments:
You must be logged in to view attached files. - March 18, 2020 at 12:18 pm #112125
Sushobhan
KeymasterHi,
Kindly use the following snippet –function remove_state_option($shipping_fields) { if(isset($shipping_fields['wcfmmp_shipping_rates']['options']['wcfmmp_shipping_state_rates'])) unset($shipping_fields['wcfmmp_shipping_rates']['options']['wcfmmp_shipping_state_rates']); return $shipping_fields; } add_filter( 'wcfmmp_settings_fields_shipping_rates_by_country', 'remove_state_option' );
Add this code to your child theme’s functions.php file and let me know how this goes.
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
Thanks! - March 26, 2020 at 11:49 am #113248
Janneke
ParticipantSorry for my late reply.
This didn’t work. After uploading the functions.php file I could not login to wp-admin anymore.
After deleting the code and upload the file again it was fine. - March 29, 2020 at 11:45 am #113831
Sushobhan
KeymasterHi Janneke,
It seems, there might be some copy pasting issue in your last attempt. Also I would suggest using https://wordpress.org/plugins/code-snippets/ plugin for code snippets.
If the problem persists, then I’ll require a temporary access of your site to further debug.
Thanks! - March 29, 2020 at 11:53 am #113833
Janneke
ParticipantThank you I will try the plugin.
Meanwhile would you please be so kind to answer to my other topic as well?
I really love Multivendor Marketplace but I need Mollie iDEAL to work in it.
It would be very sad that I can’t use WCFM because of that.Thank you very much.
- AuthorPosts
- You must be logged in to reply to this topic.