Running The WooCommerce Setup Wizard

If you skip the setup wizard when you activate WooCommerce, a number of pages will not be created. If you go to WooCommerce/Status you will see that the following pages are not set:

  • Shop base
  • Cart
  • Checkout
  • My account
  • Terms and conditions

They are all special pages designed with WooCommerce shortcodes. If you skipped or missed the setup wizard when you first downloaded and activated the plugin, you can restart the wizard at any time by going to:

~/wp-admin/?page=wc-setup

WooCommerce Bot Purchases

I haven’t had this problem, but I saw it reported. The problem is bots making purchases using invalid credit card credentials. The poster wondered how this could be mitigated and the reply was to use the plugin Advanced noCaptcha & invisible Captcha with invisible captcha enabled.

It is directly on the checkout page and blocks orders that it registers as bots.

I looked up the plugin (it is the WP repository) and it describes itself as being able to show noCaptcha or invisible captcha on various pages, including WooCommerce, Login, Register, Lost Password, Reset Password, etc.

Litespeed and the advanced-cache file

You may see advanced-cache.php as a drop-in in your plugins folder.

The advanced-cache.php file is used by many caching plugins to signal that a cache is active. When this option is checked and this file is detected as belonging to another plugin, LiteSpeed Cache will not cache.

The easiest way to find out what other plugins may be using advanced-cache.php is to FTP into the server and open the file and check its contents. If it is Litespeed, it would say ‘LiteSpeed Cache’ within the file.

Which begs the question of why it is there because the way it handles caching because the LiteSpeed Cache plugin for WordPress does not need an advanced-cache.php file.

For this reason, there is no real logic in this file. So why include it at all? You will find the answer by opening the file, and if Litespeed is the active caching system you will read that:

  • Setting the WP_CACHE global variable requires that an advanced-cache.php file exists.
  • This variable can help to increase compatibility as other plugins can check it to determine whether or not a cache is currently being used.
  • It can also help to avoid conflicts with other full page caches such as W3 Total Cache, etc.

WP Reset

WP Reset By WebFactory Ltd resets the database and deletes posts, pages, comments, and every user except the one logged in. Unless you tell it otherwise, it does not delete the media files, plugins, themes, or uploads.

Coloured Backgrounds in Gutenberg

To add a splash of colour behind a paragraph of text, you go over to the sidebar and you will see two tabs. One says Colour Settings and the other says Advanced

When you open the Colour Settings you see two palettes of colours. Depending on which palette you choose, you can change the colour of the text and/or the colour of the background to the text.

You can choose one of the predefined colours that are there or you can click on the multi-coloured circle at the end of the swatch of colours and make any colour you want.

Here is a short paragraph with the background colour a nice rose pink using the hexadecimal #ffdfe0

When you add a quote, however, the Colour Settings tab disappears leaving only the Advanced tab.

Open the Advanced tab and you will see that it says Additional CSS Class.

I wondered what it meant until I realised it was an invitation to create a CSS class.

The little that I know about classes is that you should name them something that is not likely to have been used elsewhere in the main code. So I named it ‘quote-thing’. Catchy, eh?

Stage 2 was to add the CSS to the CSS section in the Customiser. It has to refer to the class and it has to tell the class what to do. So I said it should make the background a specific colour #ebf2f5 – a pale blueish colour.

And I wanted to put a bit of padding around the quote so that it didn’t look like it was sitting in a straightjacket.

Here is the code:

/* background colour for quote */
.quote-thing {
background: #ebf2f5;
padding-top: 15px;
padding-right: 15px;
padding-bottom: 5px;
padding-left: 15px;
}

And here are two quotes attributed to Fyodor Dostoyevsky:

The greatest happiness is to know the source of unhappiness.

It is better to be unhappy and know the worst, than to be happy in a fool’s paradise.

The second Dostoyevsky quote is interesting and has been used in many a book and film as well as it appearing in real life. It also goes to show that there is nothing new under the sun. The Buddha said:

‘It is better to live one day seeing the rise and fall of things, than to live a hundred years without ever seeing the rise and fall of things.’

Notice that I didn’t add the CSS class to this quote, so it does not have a coloured background. If I gave it another CSS class name and a different hexadecimal then it could have a different colour background to the Dostoyevsky quote.