Erro in Disable Purchase During OFF Time

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Erro in Disable Purchase During OFF Time

Viewing 12 reply threads
  • Author
    Posts
    • #76126
      Marcelo Ribeiro
      Participant

      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.

    • #76244
      WCFM Forum
      Member

      Hi,

      Kindly show me store hours setting screenshot.

      Thank You

    • #76308
      Marcelo Ribeiro
      Participant
      This reply has been marked as private.
    • #76370
      WCFM Forum
      Member

      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

    • #76427
      Marcelo Ribeiro
      Participant

      I understand now but not mine is not exposed the AM PM

      Attachments:
      You must be logged in to view attached files.
    • #76432
      Marcelo Ribeiro
      Participant

      How do I get back to normal ?

    • #76453
      Marcelo Ribeiro
      Participant

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

      Please re-save store hours setting once for the vendor.

    • #139574
      sumitrathaurrs
      Participant

      store hours is not working for variable products…
      i am using OceanWP theme.

      • #139811

        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.

    • #139855
      sumitrathaurrs
      Participant
      This reply has been marked as private.
    • #139858
      sumitrathaurrs
      Participant
      This reply has been marked as private.
    • #139952

      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.

    • #143462
      sumitrathaurrs
      Participant
      This reply has been marked as private.
Viewing 12 reply threads
  • You must be logged in to reply to this topic.