1. Home
  2. Docs
  3. WooCommerce Variations Optimizer
  4. Configuration
  5. Optimized Product Variable

Optimized Product Variable

Additional to the index you may want to use the optimized version of the variable product type, which is added to your WooCommerce setup upon activating WooCommerce Variables Optimizer.

This is not required but it is recommended, specially if you are experiencing slow / high loading times during the initial load of the product page, when viewing the list of products at the shop and / or the list of products on the admin dashboard.

Product variable (optimized) works and behaves exactly as the Product variable type that comes by default with WooCommerce, in fact, this is an extension of the original; the key differences is that it tackles and tweaks certain functionality to improve and optimize database calls.

What improves?

The biggest improvement is done by overriding the functionality that loads the pricing information of a product, on the product page and on admin dashboard.

Product price on product page
Product price on admin dashboard

WooCommerce is not optimized to handle various variations and multiple products. It loads each variation, price and other attributes 1 by 1, in multiple database calls to obtaining this value, where as the optimized product only makes 1 database call.

Compatibility

While this product type is 100% compatible with the default WooCommerce functionality, it might not be with 3rd party plugins, especially those who filter or modify the price.

You can indicate the plugin to use WooCommerce transient as caching system in the settings options to restore default functionality (you might lose some speed in the process).

If by doing so, your product run slow, then we suggest to use some of the hooks specify in the developers section to integrate them yourself.

3rd party plugins are slowing the site down?

There can be certain plugins that may slow down the product with or without the “Use WC transient” option.

This may happen because they are filtering each variation price using standard WooCommerce hooks. For example, a currency switcher plugin may use these filters to modify the price, but by doing so they make a call to the database per each variation to load its details and to modify the value, slowing the load process if the product has many variations.

The solution would be to disable the usage of standard hooks using the option provided in the settings:

The filter hooks disabled are:

  • woocommerce_variation_prices_price
  • woocommerce_variation_prices_regular_price
  • woocommerce_variation_prices_sale_price

Disabling these may also nullify the functionality of 3rd party plugins. You will need to apply additional development effort to include the removed funtionality back using our own hooks provided in the developers section.

How to use the optimized variable product type?

On new products

Simply, select the type “Product variable (optimized)” from the list of product data types.

Variable product (optimized) from the list of product types

Then fill the product as you would for a normal “Variable product”.

On existing products

This plugin has an option to migrate all variable products to optimized ones on the settings options. You might want to use this tool rather than updating the products manually because WooCommerce might remove all the existing variations if you use the product edit form.

Before using the tool, please head to products and create a draft product with type “Variable product (optimized)” to make sure WooCommerce has registered the new type correctly.

Follow the next steps to change to the new type:

Step 1: Open the migration tool

Click the “Optimize products” action button.

Settings

Step 2: Select migration options

Indicate the batch size (the amount of products to process). This is important to prevent server timeouts, we recommend a number between 10 and 35. Select the product types at the From and To dropdowns.

Click the “Start” button to start migration.

Optimize / migrate options

This options can also be used to reverse the product types and change the variable products to its original type.

Step 3: Sit and wait

A progress bar will appear and will indicate the progress status. Wait until the process finishes.

DO NOT close this page since it will interrupt the process.

Step 4: Finish

The page and progress bar will indicate when the process has finished.

Process has finished
Was this article helpful to you? Yes No