Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Hide fields in shipping options
- This topic has 5 replies, 2 voices, and was last updated 6 years, 3 months ago by WCFM Forum.
- AuthorPosts
- September 4, 2018 at 11:36 pm #30784
- September 5, 2018 at 4:23 am #30796WCFM ForumMember
Hi,
How yo have disabled these from WC Vendors Pro?
Do you have OFF vendor shipping option?Thank You
- September 5, 2018 at 11:04 am #30887EdParticipant
I disabled on: WC Vendors -> Settings -> Forms -> Settings (and Product)
If I disable shipping in WCfM options, it will not be possible for seller to set mandatory information for my marketplace: weight, fixed freight and free).
- September 5, 2018 at 12:46 pm #30896WCFM ForumMember
Hi,
Kindly add this code for hide those options –
function wc_vendor_shipping_option_hide( $sbipping_fields ) { return array(); } add_filter( 'wcfm_vendors_settings_fields_shipping_national_flat', 'wc_vendor_shipping_option_hide', 50 ); add_filter( 'wcfm_vendors_settings_fields_shipping_international_flat', 'wc_vendor_shipping_option_hide', 50 ); add_filter( 'wcfm_vendors_settings_fields_shipping_rates', 'wc_vendor_shipping_option_hide', 50 ); add_filter( 'wcfm_vendors_settings_fields_shipping', 'wc_vendor_shipping_option_hide', 50 ); function wcfmgs_wcmp_vendor_register_groups_field_hide( $shipping_fields, $product_id ) { global $WCFM, $WCFMu; if( $WCFMu ) { remove_action( 'wcfm_product_manage_fields_shipping', array( &$WCFMu->wcfmu_marketplace, 'wcvendors_product_manage_fields_shipping' ), 10, 2 ); } return $shipping_fields; } add_action( 'wcfm_product_manage_fields_shipping', 'wcfmgs_wcmp_vendor_register_groups_field_hide', 9, 2 );
Thank You
- September 6, 2018 at 11:43 pm #31001EdParticipant
Thank you! But some fields have disappeared that I need :/
In fact I need to hide almost everything in shipping options and show ONLY “Free National Shipping” choice option on the “Add New Product” page. All other fields must be hidden because all products that will be added have the same weight.
In Shipping Settings Vendor Account I want to show only the store address (From Address) option.
In this way only when you will post a product will Seller determine if they will offer free shipping.
- September 7, 2018 at 6:36 am #31011WCFM ForumMember
Hi,
Ok, I understand your point and hope “In Shipping Settings Vendor Account I want to show only the store address (From Address) option.” this already working, if not then please update WCFM to the latest version and take a look.
And product part remove old custom code and use this –
function wcvendors_product_manage_fields_shipping_custom_79( $shipping_fields, $product_id ) { if( isset( $shipping_fields['national'] ) ) { $shipping_fields['national']['class'] = 'wcfm_custom_hide'; $shipping_fields['national']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['national_qty_override'] ) ) { $shipping_fields['national_qty_override']['class'] = 'wcfm_custom_hide'; $shipping_fields['national_qty_override']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['national_disable'] ) ) { $shipping_fields['national_disable']['class'] = 'wcfm_custom_hide'; $shipping_fields['national_disable']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['international'] ) ) { $shipping_fields['international']['class'] = 'wcfm_custom_hide'; $shipping_fields['international']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['international_free'] ) ) { $shipping_fields['international_free']['class'] = 'wcfm_custom_hide'; $shipping_fields['international_free']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['international_qty_override'] ) ) { $shipping_fields['international_qty_override']['class'] = 'wcfm_custom_hide'; $shipping_fields['international_qty_override']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['international_disable'] ) ) { $shipping_fields['international_disable']['class'] = 'wcfm_custom_hide'; $shipping_fields['international_disable']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['handling_fee'] ) ) { $shipping_fields['handling_fee']['class'] = 'wcfm_custom_hide'; $shipping_fields['handling_fee']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['max_charge_product'] ) ) { $shipping_fields['max_charge_product']['class'] = 'wcfm_custom_hide'; $shipping_fields['max_charge_product']['label_class'] = 'wcfm_custom_hide'; } if( isset( $shipping_fields['free_shipping_product'] ) ) { $shipping_fields['free_shipping_product']['class'] = 'wcfm_custom_hide'; $shipping_fields['free_shipping_product']['label_class'] = 'wcfm_custom_hide'; } return $shipping_fields; } add_filter( 'wcfm_product_manage_fields_shipping', 'wcvendors_product_manage_fields_shipping_custom_79', 60, 2 );
Between, did you checked WCFM own Marketplace module – https://wordpress.org/plugins/wc-multivendor-marketplace/
Thank You
- AuthorPosts
- The topic ‘Hide fields in shipping options’ is closed to new replies.