How to Increase WooCommerce Variation ...
By default, WooCommerce only loads 30 variations on the front-end for variable produc...

WPCodeBox
574
This snippet will delete orphaned WooCommerce product variations from your database, specifically addressing product variations whose main product has been deleted.
<?php
// Please make a backup of your database before running this snippet
// This snippet should only run in "Manual" mode.
global $wpdb;
$deleted_variations = $wpdb->query("DELETE o FROM {$wpdb->posts} o LEFT OUTER JOIN {$wpdb->posts} r ON o.post_parent = r.ID WHERE r.id IS null AND o.post_type = 'product_variation'");
echo "$deleted_variations variations were deleted.";



Disable WP-Cron for better WordPress performance and optimized site speed.


