­

Testing Takes Time After An Update

The main problem of using Open Source solutions like WordPress and other CMSs is that you are basically using someone else's code. This means having a lot of faith that their code won't give you any problems. This seems too much of an expectation as most of us don't even have faith in our own code. ;D

So anyway, the recent WordPress and WooCommerce updates got me thinking about one thing... testing. Because of the WordPress core upgrade and the wrong impression people got from going from 3.9 to 4.0, a lot of WordPress administrators really got worried that something bad would happen. (This is harkens back to the 2.9 to 3.0 WordPress update that broke a lot of sites). But there was not a lot of significant changes IMHO. It was like upgrading from 3.8 to 3.9.

... [Read More]

Comments

WooCommerce: Set Default Stock Quantity For Simple Products

This is a useful code snippet for WooCommerce sites that sell products that they only have a certain amount of. Examples are Antique stores, specialty stores, collectibles, etc. Instead of manually setting quantity of the items you have in stock, you can just use the following code snippet to set a default stock quantity. This way, every new product you upload will already have a quantity inputted as a default.

... [Read More]

Change "In stock" and "Out of stock" Messages In WooCommerce

Stock availability labels in WooCommerce defaults as "In stock" and "Out of stock". There is no option to change this in the WooCommerce admin panel. Most of the time, site administrators have no option but to buy a premium plugin to get this option. In fact, there are many premium plugins that include "Change stock availability lables" as one of their premium features. However, if you only need to change these labels, you don't need to purchase a premium plugin. You actually don't need a plugin at all. Just add the following code to your theme's functions.php... [Read More]

Accessing WooCommerce Product Feeds

WordPress feeds often default to posts and/or comments. If you want to access the product feeds generated by WooCommerce, all you need to do is to append the product post type to the URL. Just change the default url in your RSS button link to this: `/?feed=rss2&post_type=product` and you're good to go! :)

... [Read More]

WooCommerce: Set Number Of Products On Shop Page

Figuring this out took a while all because I expected a more technical solution than what actually was required. I spent a lot of time analyzing the WooCommerce template files and did a lot of experimentation to no avail.Using all the relevant scripts I can find and adding it to functions.php led nowhere.

It was when I realized that WooCommerce uses the post pagination properties of Wordpress that I understood that all I had to do was to set the number of posts to display in the Archives pages that I was able to solve the problem. Depending on the theme that you use, you can set the number of posts to display on the archive pages through your theme's backend or find the relevant code in the theme files. It's always a funny feeling when you find that the solution to a problem is just quite simple. :)

... [Read More]

WooCommerce: Editing Product Image Thumbnail Sizes

get_ the_post thumbnail - at the WordPress Codex.

One of the major frustrations that first timers have when using WooCommerce is when they have a set of product images that are not "square" in resolution. This means having images that do not have the same length and width. Now if you just want to make sure that the image does not get cropped to a square like monstrosity, all you have to do is to let WooCommerce stop using the WordPress thumbnails as the source image.... [Read More]