Add new WooCommerce checkout field

WooCommerce checkout page is modular. We can easily add new checkout field or edit existing fields or remove existing fields. There are two ways to add custom field in checkout page. They are: using woocommerce_checkout_fields filter and adding a custom field on certain locations. woocommerce_checkout_fields makes it very easy to… Read More »

Empty WooCommerce cart after successful order

WooCommerce by default empties cart when an order is placed successfully. But there are some plugins and/or themes, which alter this default functionality, and keep items on cart even after an order was completed with successful payment. While this can be useful for more sales, it is also can be… Read More »

Hide all WordPress admin notices for non-admin users

If you gave wp-admin access to some users as editor or contributor etc, they will see those WordPress admin notices, even though those notices are mostly meaningless for them. Not ideal for end users, and often can be confusing. So we will turn off all admin notices for non-admin users… Read More »

Hide WordPress update notices for non-admin users

If you gave wp-admin access to some users as editor or contributor etc, they will see those update WordPress notices, even though they can’t perform the update. This is not very comprehensive behavior. So we are going to turn off update notices for non-admin users from wp-admin dashboard by removing… Read More »

Get parent term of any given term id in WordPress

Getting parent term of any given term id is bit complex, and WordPress doesn’t have any built in method for this. So, I have built a utility function to get top most or immediate parent of any given term id. For example: If you want to get parent category name… Read More »