Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › WCFM showing nonexistent shipping class
Tagged: class, correios, extraneous, frete, mercado envios, product, produto, remove, Shipping, Shipping class, wcfm
- This topic has 5 replies, 2 voices, and was last updated 4 years, 9 months ago by WCFM Forum.
- AuthorPosts
- January 29, 2020 at 7:04 pm #104549contatoappParticipant
In the store manager page under the new product tab, the shipping options are showing a nonexistent shipping class.
Under the WooCommerce shipping options you can see that there is only one shipping class named “Correios”, but WCFM displays another shipping class named “Mercado Envios”.
How can I delete this extraneous shipping class?
Attachments:
You must be logged in to view attached files. - February 4, 2020 at 1:14 am #105251contatoappParticipant
Hi. Can someone help me with this?
Thanks in advance.
- February 6, 2020 at 3:12 am #105620contatoappParticipant
Hi. It’s been close to a week now. Could someone help me with this? It really impacts the way my marketplace should work. If users select that option than the shipping cost won’t be calculated during checkout.
- February 6, 2020 at 12:48 pm #105708WCFM ForumMember
Hi,
Sorry for delayed response.
Well, “Mercado Envios” is not another shipping class. It’s “No shipping class” option – https://ibb.co/NxS9m7r
Thank You
- February 6, 2020 at 6:48 pm #105884contatoappParticipant
Hi. Thanks for the response! Can I keep the user from selecting this class? E.g.: leaving the default class “Correios” selected AND mandatory.
Attachments:
You must be logged in to view attached files. - February 10, 2020 at 2:25 pm #106419WCFM ForumMember
Sure, please add this code to your site for the purpose-
add_filter( 'wcfm_product_manage_fields_shipping', function( $shipping_fields, $product_id ) { if( isset ( $shipping_fields['shipping_class'] ) ) { $shipping_class_options = $shipping_fields['shipping_class']['options']; if( isset( $shipping_class_options['_no_shipping_class'] ) ) { unset( $shipping_class_options['_no_shipping_class'] ); } $shipping_fields['shipping_class']['options'] = $shipping_class_options; } return $shipping_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
- AuthorPosts
- You must be logged in to reply to this topic.