WCFM showing nonexistent shipping class

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 5 reply threads
  • Author
    Posts
    • #104549
      contatoapp
      Participant

      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.
    • #105251
      contatoapp
      Participant

      Hi. Can someone help me with this?

      Thanks in advance.

    • #105620
      contatoapp
      Participant

      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.

    • #105708
      WCFM Forum
      Member

      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

    • #105884
      contatoapp
      Participant

      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.
    • #106419
      WCFM Forum
      Member

      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

Viewing 5 reply threads
  • You must be logged in to reply to this topic.