Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › Erro in Disable Purchase During OFF Time
- This topic has 13 replies, 4 voices, and was last updated 4 years, 5 months ago by sumitrathaurrs.
- AuthorPosts
- August 11, 2019 at 10:06 am #76126Marcelo RibeiroParticipant
error in store hours, the “Disable Purchase During OFF Time” function is not working. I set the store hours, but it is still possible to buy the product when the store is closed.
- August 12, 2019 at 10:16 am #76244WCFM ForumMember
Hi,
Kindly show me store hours setting screenshot.
Thank You
- August 12, 2019 at 8:18 pm #76308Marcelo RibeiroParticipantThis reply has been marked as private.
- August 13, 2019 at 6:22 am #76370WCFM ForumMember
Hi,
Thanks for the details.
But how you have set 24 hours format time for Store Hours? It’s not supported!
Check this – https://www.loom.com/share/429f8656ccbd4704b40c842e7442ee0b
Thank You
- August 13, 2019 at 12:42 pm #76427Marcelo RibeiroParticipant
I understand now but not mine is not exposed the AM PM
Attachments:
You must be logged in to view attached files. - August 13, 2019 at 2:02 pm #76432Marcelo RibeiroParticipant
How do I get back to normal ?
- August 13, 2019 at 3:33 pm #76453Marcelo RibeiroParticipant
I changed the wordpress time format, in the settings is still 24 but in the display this is AM PM
Attachments:
You must be logged in to view attached files. - August 20, 2019 at 5:31 am #77404WCFM ForumMember
Please re-save store hours setting once for the vendor.
- June 8, 2020 at 4:17 pm #139574sumitrathaurrsParticipant
store hours is not working for variable products…
i am using OceanWP theme.- June 9, 2020 at 12:33 pm #139811Sarmistha ChakrabortyMember
Hello,
Can you explain a little more what do you mean by “store hours is not working for variable products” ?
We have already checked that if “Disable Purchase During OFF Time” is enabled then “Add to cart” button will not display (variable product as well).Thanks.
- June 9, 2020 at 2:27 pm #139855sumitrathaurrsParticipantThis reply has been marked as private.
- June 9, 2020 at 2:30 pm #139858sumitrathaurrsParticipantThis reply has been marked as private.
- June 9, 2020 at 8:08 pm #139952Sarmistha ChakrabortyMember
Hello,
Try this code in your theme’s functions.php –
function woocommerce_template_single_add_to_cart() { global $product,$WCFM, $WCFMmp; $product_id = $product->get_id(); if( $product_id ) { $vendor_id = wcfm_get_vendor_id_by_post( $product_id ); } if( $vendor_id ) { $is_store_close = $WCFMmp->wcfmmp_store_hours->wcfmmp_is_store_close( $vendor_id ); if( !$is_store_close ) { do_action( 'woocommerce_' . $product->get_type() . '_add_to_cart' ); } } else { do_action( 'woocommerce_' . $product->get_type() . '_add_to_cart' ); } }
Thanks.
- June 23, 2020 at 11:17 am #143462sumitrathaurrsParticipantThis reply has been marked as private.
- AuthorPosts
- You must be logged in to reply to this topic.