• Sometimes we want to display dynamic content based on where the visitor has come from. The place where the vistor link your website link from is called a “Referer”, so when someone clicks your link on Google, then Google is the referer. Using PHP we can target users coming from Google, we can then show […]

  • The sticky payment section in the Storefront Theme can be a little buggy. Sometimes it’s best to remove it.Here is how to make WooCommerce payment section non sticky. Just drop the code into your child themes functions.php

  • Always try to speed up the WooCommerce checkout as much as your can for your customers. A quick tip is to uncheck the “Ship to different address” checkbox by default. Customers do not commonly use this features and it’s a waste of their time having to untick it. So let’s speed up the time checkout […]

  • WordPress white screen after moving hosting? You might have a corrupted .htaccess file. There are many reasons your WordPress installtion could be showing a white screen. In some cases fresh .htacess file in the main directory can fix your WordPress site. I recommend renaming the old file via FTP or SSH. name it something like […]

  • WordPress normally sends emails from [email protected] If you want you to change which email alias WordPress should send emails from, then you can put the following into into your functions.php or a plugin. I’ve also included the function to change the WordPress email sender name. Replace the email and name for your own site.

  • Update: This trick still works with MacOS High Sierra and Mojave 10.14+. Apple likes their computers quite so they leave the fans off for as long as possible. This could harmful if you are doing intense work or gaming in a hot location. I use SMC Fan Control to kick up the fans before the […]

  • You may have edited some config files for Apache, PHP-FPM, phpMyAdmin or MySQL, and now it’s time to restart for the changes to take affect. For reference, I’m running Bitnami WordPress on Google Cloud Compute Engine.

  • [cc lang=”php”]function wpsnip_remove_sales_flash() { return false; } add_filter( ‘woocommerce_sale_flash’, ‘wpsnip_remove_sales_flash’ ); [/cc]

  • [cc lang=”php”] add_filter( ‘default_checkout_country’, ‘wpsnip_default_checkout_country’ ); add_filter( ‘default_checkout_state’, ‘wpsnip_default_checkout_state’ ); function wpsnip_default_checkout_country() { return ‘US’; } function wpsnip_default_checkout_state() { return ‘CA’; } [/cc]

  • First up let’s add As an example my Plugin is called Puri. Replace that with your Plugin name. First up let’s add the following to the puri.php (yourplugin.php) file in the first level. Once defined let’s register the WordPr ess menu. Go inside the admin folder and find