If you use WooCommerce you probably know Subscriptions, that awesome plugin that allows anyone to sell subscriptions. Today, I had a ticket about an issue between Suscriptions and Shipment Tracking, a great extension to track your shippings.
Here is what the customer was facing:
I’ve been using Shipment Tracking with Subscriptions for a while now, and every month I run into the same problem with shipment tracking. If I add shipment info in January for the order that month, the email goes out correctly to the customer with the tracking info.
But if I don’t manually remove the tracking info and set it back to “Custom Provider” before the renewal purchase order is placed, the renewal order email that goes to the customer includes the old tracking info at the top and it’s very confusing.
After a quick talk with guys from Skyverge (thanks Matt!), we came up to a nice solution to fix small issue between these two great plugins. The following code snippet will stop the unwanted tracking meta from transferring from the previous subscription order to the new renewal order. You will need to change the _tracking_meta_key within the code below to reflect the exact tracking meta key stored in the database for this to work properly. And boom (don’t forget: this snippet needs to be added in functions.php in the theme folder)!
Here is a quick snippet to allow WooCommerce users to read/access private posts or private products. Pretty useful when you want to create special offers for some existing customers only. Simply place that snippet in functions.php in your theme folder:
At WooThemes we have an awesome add-on for WooCommerce called Checkout Field Editor. This add-on allows to add many new fields to the checkout page. This is a truly great plugin. You can add dropdown select list, checkboxes, radio buttons, and even date pickers. And pretty often people ask me how to apply restrictions on the the date fields types. For example how to force customers to choose a date 4 days after today, or pick a date on a specific dates range etc… And Checkout Fields Editor doesn’t allow to do this by default. Well, that’s understandable, as this will not be used by all users of this add-on, just a few. So, to apply this restrictions on date fields I have a quick snippet for you.
This snippet will output some custom jQuery code in the footer of your site, it has to be placed in functions.php, in your theme folder:
As stated in jQuery UI documentation regarding minDate and maxDate:
Restrict the range of selectable dates with the minDate and maxDate options. Set the beginning and end dates as actual dates (new Date(2009, 1 – 1, 26)), as a numeric offset from today (-20), or as a string of periods and units (‘+1M +10D’). For the last, use ‘D’ for days, ‘W’ for weeks, ‘M’ for months, or ‘Y’ for years.
So, it’s up to you to edit minDate: 1 and adjust it to fit your needs. Enjoy!