Woocommerce Custom Coupon Dates - wordpress

I am a newbie in Woocommerce I just wanted to ask on how can I set the coupon to be enabled on certain booking dates? I already published the coupon code but I wanted that the coupon code can only be used in certain dates.
Jan 11, 2023 - Published coupon code, it can be only used on the dates of January, 20-29. I am using this method so that customers can use the code when they only selected the dates of January 20-29, 2023.

Jan 11, 2023 - Published coupon code, it can be only used on the dates of January, 20-29. I am using this method so that customers can use the code when they only selected the dates of January 20-29, 2023.
So the problem is solved? If not, you can try out 'WP Coupons and Deals – WordPress Coupon Plugin'. It is free and should fill your requirements. If the problem is solved, you can use the check mark on the left side of this post.

Related

Move Out of Stock Item to different category in Woocommerce/WordPress

I'm working on a site and trying to make it so that a product that is out of stock automatically moves to a "sold out" category. The category ID would be 396.
I also would like it that products will automatically use the last modified date as the published date.
Thanks for any help I can get.

How to sort results by post_date DESC when using Algolia with Wordpress?

I'm using www.algolia.com as the provider to power the search engine for my client's Wordpress site.
It works great, but I can't figure out how to sort the search results by post_date DESC.
I've created a "replica" table and added a SORT-BY post_date DESC as a "sort-by attribute" to the "Ranking Formula" using their admin console, but the dates are still out-of-order.
For example, the results will display mostly in order, but then there are anomalies:
May 10, 2018
May 09, 2018
May 03, 2018
March 28, 2018
May 01, 2018
Anyone have any experience solving this problem with Algolia?
By default the engine doesn’t interpret strings following the ISO date format. To enable filtering by date, you must convert your dates into numeric values (generally a UNIX timestamp).
{
"objectID": "myID1",
"date": 1362873600 // UNIX timestamp as an integer
}
For more info please refer: https://www.algolia.com/doc/guides/searching/filtering/?language=php#filter-by-date
Hope this works for you.

Inserted Wordpress Post Shows Bad Date In RSS Feed

Our wordpress blog (currently version 3.4.2) has an external process that inserts posts directly into the database from a third party. I don't have the ability to change that, so don't bother telling me it shouldn't be done that way. I CAN change the insert statements though.
The posts show up and everything looks fine except that the RSS feed shows an invalid year (expecting 2013, instead getting -0001) in the date field:
<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
The post_date field in the wp_posts table for the post shows the correct date, and on the site the post has the right date. It shows up in the right place chronologically.
If I manually edit the post using the control panel and change the date even by just one second and re-publish the post then it fixes the feed.
This problem causes the RSS feed to not validate, and it's breaking other things. Help!
There are 4 dates stored for each WP post: Post_date, post_date_gmt, post_modified and post_modified_gmt.
I recommend you to insert the same date for both post_date and post_modified and see if it works.

create date formatted custom_meta field in wordpress admin

I have created a custom meta field to be used within a custom post type, that is to be the start time of a series of events. However, I would like to run my query_posts off of this value, but it is not formatted in date/time format, therefore '1:00pm' shows up in the list before '9:00am'. Is it possible to format this value in the db or at least prior to setting the 'meta_key' meta_value in my arguments for my query?
I've come across this problem a few times before. I'm going to use my most recent example because it sounds like it's along the same lines of what you're doing.
I had to create an event calendar using WordPress. In my custom post type, I had two fields: a start time and an end time. Instead of just using "1:00pm" as the start and end times, I also included the dates. This would allow for events that would last an entire weekend like a concert or a race.
What I'm getting at here, is once the user submitted that the event started on January 3, 2012 at 8:00 am and ended on January 3, 2012 at 10:00 am, I saved both of the variables using strtotime(). If you're not familiar with this function, you can read more about it here: http://us.php.net/manual/en/function.strtotime.php.
I also suggest using the datetime picker add-on for jQuery UI http://trentrichardson.com/examples/timepicker/.
I hope this helped. I know I was a little vague at times. If you need me to explain anything in more detail, don't be afraid to ask.

Drupal Date api, dates are displayed as one day earlier than the date entered

i'm not sure what is going wrong, but I created a Date field, and though it has been working fine, on March 12, 2012 and beyond all dates entered are retrieved one day earlier. The fields in the node edit display the correct date, but retrieving is the problem. I'm not sure if it is a timezone issue? Why March 12, 2012 and past that?
I have a feeling it has something to do with UTC and DST, but i dont know what to do. In the Date and Time settings I have it set as america/toronto which is what I want.
I just added the timezone when using the format_date function:
$date_start = format_date(strtotime($node->field_event_date[0][value]),$type='custom',$format='F j, Y',$timezone='America/Toronto');

Resources