Skip Navigation

Resolved

Topic Tags: Bug

Overview of the issue

WooCommerce 7.8.1 recently introduced some changes that have resulted in the following fatal error. As a consequence, you may encounter an issue where you are unable to translate your products in our Advanced Translation Editor (ATE), and they remain stuck in the “In Progress” status.

PHP Fatal error: Uncaught Error: Call to undefined function wc_get_default_product_type_options() in .../wp-content/plugins/woocommerce/includes/tracks/events/class-wc-products-tracking.php:242

Workaround

Note: This issue was solved with WooCommerce 7.8.2.

Please, keep in mind that this error was introduced by WooCommerce and needs to be fixed there.
In the meantime:

  • Please be sure of having a full backup of you site before proceeding.
  • Open … /wp-content/plugins/woocommerce/includes/tracks/events/class-wc-products-tracking.php file.
  • Replace:
    use Automattic\Jetpack\Constants;
    
  • With:
    require_once dirname( __FILE__ ) . '/../../admin/wc-admin-functions.php'; // QUICK FIX
    
    use Automattic\Jetpack\Constants;