How to fix and Prevent SQL Injection in WordPress

Introduction SQLi is the manipulation of a security flaw in database systems. WordPress, as a platform, runs server-side scripts in PHP and uses SQL databases. Hence, SQL and PHP make WordPress websites vulnerable to attackers. They could insert malicious URLs (which are embedded with commands) that trigger unwanted behaviors from your database. Consequently, your database’s…

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…