To add a user to the Linux use this command useradd -g wheel new_username -g means to add a new user to the 'wheel' group which is the sudo-root group, more info can be found here:...
WooCommerece Refresh checkout fields on changed country and shipping method
When having problems with not updating shipping methods and total price when changing country and shipping methods add this code to the functions.php /***************************** * Refresh...
WooCommerce: Add Content to a Specific Order Email
PHP Snippet: Add Content to the WooCommerce Customer Processing Order Email /** * @snippet Add Text to Customer Processing Order Email * @how-to Get CustomizeWoo.com FREE * @author milangru */...
Add product images to Woocommerce emails
To be able to add woocommerce produst images to emails and to add styles to it, just add this code to functions.php or into plugin // // Adds image to WooCommerce order emails // function...
WooCommerce: Redirect single product pages to home page
/** * @snippet WooCommerce Redirect single product pages to home page */ add_action( 'wp', 'ts_redirect_product_pages', 99 ); function ts_redirect_product_pages() { if ( is_product() ) {...
Chain three asynchronous calls using jQuery promises
$.ajax() .then(function(){ return $.ajax() //second ajax call }) .then(function(){ return $.ajax() //third ajax call }) .done(function(resp){ //handle final response here })
Linux fsck command
The system utility fsck (file system consistency check) is a tool for checking the consistency of a file system in Unix and Unix-like operating systems, such as Linux, macOS, and FreeBSD. fsck -y...
Clone disk/partition to external HDD/SSD with ‘dd’ command in Linux
To clone HDD/partition with dd command, the destination HDD/partition must be equal or larger in size than the source. sudo dd if=/dev/sda5 of=/dev/sdb2 conv=sync,noerror bs=64K status=progress...
Add footer to the WordPress page template
<?php wp_footer(); ?>
Add header to the WordPress page template
<?php wp_head(); ?>