Skip to content

3.6.x notes FAQ

Peter Fabian edited this page May 27, 2019 · 11 revisions

The database update has been running for hours/is not completing

As of 3.6.x database updates are ran using Action Scheduler which uses a system based upon WP Cron. If WP Cron is disabled on your system, or cron jobs are delayed, these jobs may never run, or may take longer than usual to run.

You can check if cron is disabled in the status report; WooCommerce > Status.

Updates can be ran manually via Tools > Scheduled Actions > Pending (click run next to each task). This screen can also help you check progress of the queued updates.

I am having issues sorting/searching by SKU, price after the update

In 3.6, we've extracted data such as product SKU or prices to a lookup table to improve performance during sorting, filtering, and searching, so if the lookup table is not populated correctly you might experience problems searching for SKUs amongst other things.

The database update for 3.6 must be complete for these queries to work correctly.

  • Ensure you clicked the 'update database' notice after updating to 3.6. Wait for the job to complete (or see above if it's taking a while).
  • Check WooCommerce > Status > Scheduled Actions. If you have any upgrade tasks pending there, you can run them manually by clicking on the Run link that appears on mouse over in the list of Pending actions.
  • You can Regenerate Product lookup tables via WooCommerce > Status > Tools.

Will there be any database issues if I downgrade to 3.5.x after updating to 3.6.x?

There are 3 database upgrade operations in 3.6:

  1. Create lookup tables for product data
  2. Add an index to the product downloads table
  3. Migrate order (sorting) meta for terms to a new naming structure.

1 and 2 won't cause issues on 3.5 because they work independently.

3 may cause your terms/categories to appear out of order if you had previously sorted them. They would need to be sorted again if you planned on sticking with 3.5.x and didn't have a database backup available to revert to.

The "Refund" input field is grayed out when viewing orders and trying to refund items

This is an intentional change. If you collect taxes, the refund box is greyed out.

Reasoning Previously you could either refund line items (still possible in 3.6) or enter a refund amount in the now greyed out field. The problem with this is:

  • The system does not know which items you're actually refunding
  • The system has no way of knowing what taxes have been refunded

This breaks reporting, in particular tax reporting, which would not be able to account for your refunds.

Refunds are still possible, either by:

  1. Refunding the line items (you can enter the qty you wish to refund, or amount, per line item
  2. Changing order status to 'refunded' which creates a refund on all line items in the order.

get_woocommerce_term_meta throws a deprecated notice, why was this wrapper deprecated?

This wrapper was put in place when WooCommerce implemented a term meta system long before WordPress has its own. When WordPress 4.4 released it's own version of term meta, these functions called both the custom functions, and the WordPress functions whilst they were transitioned to.

Since WooCommerce no longer supports WP versions lower than 4.4, the wrappers are no longer necessary and native Wordpress functions can be used instead.

Emogrifier update

Emogrifier was updated to version 2.1 and the way it's loaded by WooCommerce has changed. The namespace name now needs to be specified to instantiate the class:

$emogrifier = new Emogrifier( $content, $css );

into:

$emogrifier = new \Pelago\Emogrifier( $content, $css );

Emogrifier is used by WooCommerce behind the scenes and only loaded where needed. We did not anticipate this being used by 3rd parties directly, so if you are a developer using this please get in touch with your use-case so we can consider (for example) a wrapper around this to prevent the need for direct calls/including core classes manually (which is likely to conflict in the future).

What was deprecated in 3.6?

  • wc_get_min_max_price_meta_query – removed in favour of lookup tables which remove the need to filter via post meta.
  • Term meta helper functions – deprecated in favour of WP core term meta functions such as https://developer.wordpress.org/reference/functions/get_term_meta/. These have not been needed since WP 4.4.
  • WC_Country::load_country_states – States are now loaded on the fly as needed.
  • WC_Cache_Helper::delete_version_transients – Transients are now versioned within the value negating the need for cleanup.
  • WC_Background_Updater – We’ve switched updates to the ActionScheduler queue.
  • Simplify Commerce – This gateway has been deprecated for several years and hidden in the UI. The code has now been removed.
Clone this wiki locally
You can’t perform that action at this time.