Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Hiding Local Pickup on Vendor shipping options
- This topic has 3 replies, 2 voices, and was last updated 6 years ago by WCFM Forum.
- AuthorPosts
- December 14, 2018 at 2:37 am #40000johanParticipant
Hi, I have asked this before without it being solved.
I would like to hide the ‘Local Pickup’option on the Vendors Dashboard. I found the snippet below but it seem not to work. Can you please advise. I have added it to my child theme as I do with all the other snippets but still not working. See Attachment. Please advise if I am doing something wrong.
—————-
function wcfmmp_custom_hide_local_pickup_vendor($methods) {
unset($methods[‘local_pickup’]);
return $methods;
}
add_filter( ‘vendor_shipping_methods’, ‘wcfmmp_custom_hide_local_pickup_vendor’ );—————
Regards,
JayAttachments:
You must be logged in to view attached files. - December 14, 2018 at 5:10 am #40011WCFM ForumMember
Hi,
That code is absolutely fine, but when you copy-past that, it causing “single quote” problem.
Delete that and add this one ->
function wcfmmp_custom_hide_local_pickup_vendor( $methods ) { if( isset( $methods['local_pickup'] ) ) unset($methods['local_pickup']); return $methods; } add_filter( 'vendor_shipping_methods', 'wcfmmp_custom_hide_local_pickup_vendor' );
Thank You
- December 15, 2018 at 5:58 am #40068johanParticipant
Many Thanks!
- December 15, 2018 at 6:30 am #40080WCFM ForumMember
You are welcome 🙂
- AuthorPosts
- The topic ‘Hiding Local Pickup on Vendor shipping options’ is closed to new replies.