How to automatically clean up /tmp directory contents in Linux?

How to automatically clean up /tmp directory contents in Linux?   Every Linux system has a directory called /tmp which has mounted with separate file system. It has special filesystem called tmpfs. It’s a virtual filesystem and operating system will automatically mount /tmp mount point while system booting. If you want to mount /tmp directory separately as…

Defined shipping ZIP Code validation during checkout in WooCommerce

Runtime check pincode // Validate function action_woocommerce_after_checkout_validation( $data, $error ) { // The accepted delivery zones $del_zones_array = array( 500001, 500004, 500008, 500028, 500030, 500032, 500033, 500034, 500036, 500048, 500049, 500057, 500086, 500089 ); // If the postal is not within the array, deny checkout if( ! in_array( $data[‘shipping_postcode’], $del_zones_array ) ) { $error->add( ‘validation’,…

How to disable WooCommerce postcode validation

Do you want to remove the zip code field? In this tutorial, we’ll show you how to disable the WooCommerce postcode validation to improve your checkout page and increase your conversion rates. Why remove the WooCommerce postcode validation? By default, postcode fields are required in WooCommerce so they include validation. However, sometimes those fields aren’t…

WooCommerce – Sell to only one State

Let’s say you are selling fresh produce and only want to sell to your home state. Because you are selling fresh produce such as fruits, vegetables and don’t have a proper delivery system in place to deliver all over the country. add_filter( ‘woocommerce_states’, ‘bwt_restrict_states’ ); function bwt_restrict_states( $states ) { $states[‘IN’] = array( ‘TS’ =>…

WooCommerce Visual Hook Guide: Checkout Page

WooCommerce Visual Hook Guide: Checkout Page

WooCommerce Checkout Page [Visual Hook Guide] woocommerce_before_checkout_form –> “Have a coupon?” section <– woocommerce_checkout_before_customer_details Billing Details woocommerce_before_checkout_billing_form First Name * Last Name * Company Name Email Address * Phone * Country * Address * Town / City * State * Zip * woocommerce_after_checkout_billing_form Ship to a different address? woocommerce_before_checkout_shipping_form First Name * Last Name *…