How to add a loading spinner to WooCommerce Checkout page
A client of mine wanted to have a loading spinner on WooCommerce checkout page.
It appears that some of...
Twitter Style “Time Ago” Dates on PHP
The following function will show the time like Twitter with that info ago, like 9 hours ago:
function _agotime($tm,$rcs = 0) {
$cur_tm...
Get the Week Number From A Date in PHP
When you code maybe you find difficult to get the week number from a date. Maybe you think of some particular dates and how...
Check If A Date Is In The Past Or In The Future in PHP
The following code will help you to check if a date in the future or in the past. Where are this required? A lot...
Get Difference Between Two Times
The following function will help you get the difference from two dates in PHP. You need to specify the 2 dates when you call...
Convert minutes to hours and minutes or seconds to minutes and seconds
If you wish to convert minutes to hours and minutes display or convert minutes to minutes and second display here is a super useful...
Sort posts in WordPress by 2 custom fields
So Wordpress doesn't have a way to sort posts by 2 custom fields. I tried different solutions for this option on the...
Hide other shipping method when flat rate is available in Woocommerce
I wanted to create a function for Wordpress plugin Woocommerce to hide other shipping method when flat rate is available.
Export an array to CSV in PHP
I was working on creating a small code that would help me export any array into a CSV file.
How to Add WooCommerce Custom Text Field for all Variations
I need it to add a custom text field for every variations in WooCommerce products. I figure out a code that helped...