List WooCommerce Products In A Table

By default, WooCommerce is set up to list products in a grid. You can choose the number of thumbnails across the page and the number of rows of products. And you can add the title of the product, the price, and a Buy button below the thumbnail. And there is nothing wrong with that layout. But for some stores it would be nice to have the products in a table, vertically.

That’s what the Woo Product Tables plugin does, It is in the WordPress Repository and it enables you to display your products as a list. A column of thumbnails appears on the left, then in columns across the page you see the title, then the summary, the price, and the Buy button for your selected products.

I like the look of it a lot, particularly for displaying products in a table where a customer might buy several products, choosing right from the thumbnails. For that you need the pro version, which is $49 for one site. Another reason to like the plugin is that the display is responsive. It’s food for thought for the right kind of products.

The pro version is marketed by WooCommerce as Product Table for WooCommerce, and you have to install the free version and then the paid version on top of it.

Replacing Text: Plugin or Theme

Being able to replace text in WordPress themes or plugins is very useful.

Here is Jeff Star on how to replace all instances of a string in WordPress. As he says, nothing is actually changed in the database — it’s only changed when output to the browser.

function replace_text($text) {
	$text = str_replace('look-for-this-string', 'replace-with-this-string', $text);
	$text = str_replace('look-for-that-string', 'replace-with-that-string', $text);
	return $text;
}
add_filter('the_content', 'replace_text');`

And this is all well and good, but assumes you know how to find the string and find it unambiguously.

Say What? Plugin

Being able to replace text in WordPress without being a developer is very handy, and bearing in mind the credentials of the author of the ‘Say What’ plugin author, feels safe. Lee Willis, the author is a WordPress core contributor. What this plugin does is enable you to replace text that is part of a plugin or theme with your desired text.

The free version is in the WordPress repository. What you need to do if you are using it is to go find the text string you want to replace. And that is not easy if you are not a developer, which is where we started.

The pro version of Say What will help you to find the original text with autocomplete once you start typing. And in the demo video of the pro version, it works very well. I am thinking about getting the pro version, which is $39.00 for a single site and $69 for multiple sites. The information on the site says that the cost for renewal will be 50% of the purchase price at time of renewal.

The only downside I can think of is that it really needs the plugin to be activated in order for the search and replace to work. It would be neat if it output a php snippet that one could add. I guess that would enable someone to buy a single site licence and then circulate it among multiple sites, but the relatively low cost maybe makes that unlikely. Still, I think it’s a good idea and I might mention it to the developer.

How to see hidden files on a Mac in the Finder

  1. In any Finder window that you think has hidden files in it.
  2. Press Command+Shift+Full stop.
  3. Your hidden files will become visible.
  4. Press Command+Shift+Full stop to hide them again.

Full stop is a dot – which is what hidden files begin with.

Export All URLs

Export All URLs and not all the things. Just export the URLs of all the posts, and the categories under which they were posted. Or if one wants, export the post IDs. As to when you would need this, well perhaps you are in my position.

I am going to move a site and change the platform of the main site. But I want to keep the WordPress blog directory. And I don’t want to reproduce or export-import all the posts. There is a lot of stuff in the 273 posts that I don’t want to move across. Some posts can just fade away, or I can 301 redirect them (but I probably won’t).

Export All URLs Plugin

Instead, I have copied most of the posts as plain text into a plain text document. And I made a note of the URLs. But then I will move the site and turn it into a completely WordPress site. At that point I will no longer have the old URLs to check. So I just used a neat little plugin in the WordPress repository named Export All URLs. I just ran it and it does what it says on the tin. Now I have a list of URLs and categories. And with that list I will be able check the URLs against my plain text posts. I will use that check list when I post the posts to the new site.

Eventually I will put a statement on the home page when the site is moved. It will explain that the whole service has moved to a new home. And it will explain all the good reasons someone should follow there. I hope all this is not premature, because the functionality of the new site is not in place yet. It too is built in WordPress with WooCommerce. But there will also be some custom templates and other goodies..

Find and Replace

Find and Replace is something that you really need when you need it. And the ‘when’ of when you need it is when you move your WordPress site to a new domain or server.

When you do that you will almost certainly need to run a search and replace on the database. The reason is that there will be links that are no longer correct. For example, if you have a link on a page or post that refers to a location on your old domain.

There are a couple of plugins that do Find and Replace. There’s Better Search And Replace, of which there’s also a pro version with added features. And there’s Search Regex made by John Godley, who also makes the Redirection plugin (which is excellent) and who works at Automattic.

Automattic is the company that owns the community version of WordPress and is the principal trustee for the version from which stand-alone WordPress sites are made.

WooCommerce Blocks – What Is a Stable Block

WooCommerce Blocks is a plugin that adds functionality to the WooCommerce plugin. So far so good. And the specific functions it adds are listed (as of the version 3.1.0 current today) as follows:

Featured Product Block
Featured Category Block
Hand-Picked products Block
Best Selling Products Block
Top Rated Products Block
Newest Products Block
On Sale Products Block
Products by Category Block
Products by Tag Block
Products by Attribute Block
Product Categories List Block
Reviews by Product
Reviews by Category
All Reviews
Product Search
All Products
Filter Products by Price
Filter Products by Attribute
Active Product Filters
Cart
Checkout

The thing is that the WooCommerce plugin itself is being updated all the time, including adding what are called ‘stable blocks’ from WooCommerce Blocks into WooCommerce.

So what are the ‘stable blocks’? And of course the answer is that the list is changing all the time as more blocks are declared stable and incorporated into WooCommerce.

But – as of today, if you go to this WooCommerce.com page you will see:

In WooCommerce 3.6, WooCommerce Product Blocks build upon the power of the block editor, allowing you to easily feature products on posts and pages via eight new blocks:

  • Featured products: Select and display a single product in a new “high-impact” format. Control text alignment, show or hide the price and description, add a color overlay, change the button call to action, specify a custom height, or override the product photograph.
  • Individual, hand-picked products: Search for and display products of your choice in a grid.
  • Bestsellers/top-rated: Display a grid of your best-selling products, filterable by category.
  • Newest products: Display a grid of your newest products, filterable by category.
  • Sale products: Display a grid of on sale products, filterable by category.
  • Products with specific attributes or terms: Display any products that have been assigned multiple or specific attribute terms.

So if you are only using the blocks that are in WooCommerce itself, you could deactivate and delete the WooCommerce Blocks plugin safely, as I just did.