anttiviljami / woocommerce-clean-orphaned-variations
Adds a tool to the WooCommerce tools page, which finds and deletes any Product variations without parents.
Installs: 45
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 0
Forks: 3
Open Issues: 1
Type:wordpress-plugin
This package is auto-updated.
Last update: 2020-04-27 05:27:38 UTC
README
Adds a tool to the WooCommerce tools page which finds and deletes any Product variations without parents.
Usage
- Navigate to: WooCommerce > System Status > Tools (
/wp-admin/admin.php?page=wc-status&tab=tools
) - Click the "Clean Orphaned Variations" -button
Screenshots
Why?
Sometimes, for reasons unknown, WooCommerce will leave orphaned variation products in the database which can cause all sorts of problems.
Most commonly, you would get this error message
PHP Fatal error: Call to a member function get_attributes() on a non-object in /my/wp/root/wp-content/plugins/woocommerce/includes/class-wc-product-variation.php on line 664
This small tool is a quick and easy fix for those situations.
Installation
The Composer Way (preferred)
Install the plugin via Composer
composer require anttiviljami/woocommerce-clean-orphaned-variations
Activate the plugin
wp plugin activate woocommerce-clean-orphaned-variations
The Old Fashioned Way
You can also install the plugin by directly uploading the zip file as instructed below:
- Download the plugin
- Upload to the plugin to /wp-content/plugins/ via the WordPress plugin uploader or your preferred method
- Activate the plugin