1. Home
  2. Docs
  3. WPC Product Timer
  4. FAQs
  5. 1. Common mistakes when setting up timers

1. Common mistakes when setting up timers

1/ Default action vs reverse actions:

Default actions (set purchasable/ set in stock / set visible) cannot be used alone. They must follow/ be put under another reverse action contrary to themselves (set unpurchasable / set out of stock/ set hidden).

In order to set a product to be visible on Mondays, please use:

  • Action 1: Set hidden, Everyday.
  • Action 2: Set visible, Weekly on Every Monday.

 

 

2/ Independent actions:

3/ Date-time combination:

3.1/ Continued/ uncontinued time range:

It is compulsory to add an action to set the products to unpurchasable first then follow with adding a purchasable action for a time range. When the time range is not continued for a 24-hour duration, for example, from 1.00 pm to 1.30 pm is continued, but from 2.00 pm to 7.00 am is not continued, cause it proceeds to the next day.

So when the time range you choose is not continued, it must be separated into two temporal points “before” and “after”.

To set your product to be ready for purchase from 7:00 am to 2:00 pm every day, please set it up like this:

  • Action 1: Set unpurchasable, Daily before time: 7:00 am.
  • Action 2: Set unpurchasable, Daily after time: 2:00 pm.

3.2/ Combining Date & Time conditionals:

Each action can have 1 Date & 1 Time conditional, so you can choose the combined conditionals: for example, Date – Weekly on every Monday, Time – Daily time range, 11 am – 11 pm, etc.

When you need to set up different timers for each weekday, create a separate action for each day (7 actions for 7 weekdays). You just need to click on Add Time button, then add a time range for the above actions. Now you’re good to go.

– Action 1: Set out of stock, Weekly on Every Monday

– Action 2: Set out of stock, Weekly on Every Tuesday.

etc

3.3/ 24-hour duration conditionals:

There’s no need to specify the time range (ie. from 12:00 am to 11:59 pm) if you mean it’s unpurchasable for the whole 24-hour durations of the day, for example, on Saturdays and Sundays. Just add the weekday.

– Set unpurchasable, Weekly on Every Saturday (leave the time out)

– Set unpurchasable, Weekly on Every Sunday

3.4/ Order of actions:

Order of actions matters.

If you’re using a universal reverse action on the top for the list of actions, you don’t need to specify the time your product will be unpurchasable, just add the date and time that your product is ready for purchase. Outside those times, the universal action will automatically reverse the status of your product:

– Action 1: Set unpurchasable, Everyday >> this is effective for all other actions that follow it.

– Action 2: Set purchasable, Weekly on every Monday…

– Action 3: Set purchasable, Weekly on every Tuesday…

– Action 4: Set purchasable, Weekly on every Wednesday…

– Action 5: Set purchasable, Weekly on every Thursday…

– Action 6: Set purchasable, Weekly on every Friday…

 

4/ Daily time range – Date range:

For your information, in order to set any action for a time/date range, you can do it by using one of the following methods:

1. Method 1: Break it into two actions: before date/ time and after date/ time. Specifically, to set a product to purchasable between 1.00 pm and 1.30 pm means you need to set it to unpurchasable before and after that two temporal points.  So the settings should be:

– Action 1: Set unpurchasable, daily before time 1.00 pm.

– Action 2: Set unpurchasable, daily after time 1.30 pm.

2. Method 2: You can use the time conditional: daily time range, but you still need another action to reverse the default status of your product from purchasable to unpurchasable (because the default state set by WooCommerce is that when you published a product, it’s always purchasable/in stock).

This reversing action must be placed above other actions in the sequence to make our plugin work. It should be prioritized always. You can then add other timers under it to add specific complex conditions for your products. So the settings should be:

– Action 1: Set unpurchasable, Everyday.  (Universal reverse action)

– Action 2: Set purchasable, daily time range 10.30 am to 8.00 pm.

– Action 3: …