• Resolved Jurfaas

    (@jurfaas)


    Using 1.6.9 of your plugin.
    The ‘nuke’ command will only delete 10 items from the chosen table.
    No errors, no white screen, just a return to the Woocommerce Store Toolkit admin plugin page and a counter which shows 10 items less than before the ‘nuke’ command.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hi there, thanks for raising this, it seems my timeout detection script must be failing as it should be deleting 100 records then moving into the next 100 records. I’ll get this sorted in the next minor Plugin update ??

    Thanks for a great tool! However, it still only deletes 10 items at a time, nearly two months after it was reported – any progress on this ahead?

    Hi @aand, yeah I’ve been pulled in a hundred different directions over the past two months as well as migrated between Germany and Australia so this task fell off the cart so to speak.

    I’ll get the WooCommerce 3.0 compatibility patches out across the suite (due on Thursday, before April 4) then get this task dusted.

    Makes sense – thanks a lot for looking into it, looking forward to getting it working again!

    Hi – I think this limit of 10 items deleted may still exist. I’m running the updated Version 1.7.2 but still have the issue. I can only delete 10 orders at a time. Otherwise this seems like a really useful plugin

    Hi @scottlush, I’m going to walk the code now, if I can’t spot the issue I’ll add a PHP snippet to turn off looping bit off.

    Interim fix is adding the following PHP snippet to your Theme’s functions.php

    function custom_woo_st_clear_dataset_order( $args ) {
    $args[‘numberposts’] = -1;
    return $args;
    }
    add_filter( ‘woo_st_clear_dataset_order’, ‘custom_woo_st_clear_dataset_order’ );

    This still seems to be linked to our checking of the number of Posts controlled by WordPress, I may need to “force refesh” the Post count. I added in a error_log() line for spotting when the permanent loop detection kicks in and fails the nuke as well as displaying a Admin notice on next screen refresh.

    I bolted on a wp_cache_delete() in there too just so we know we are fetching the Post counts directly off the database via the SQL query in wp_count_posts(). I applied this change to all nuke types, not just Orders.

    1.7.3 is up with the above changes, give it a try. If it persists let me know and I’ll poke it with a bigger stick or just expose a WordPress Filter to turn off the looping.

    I’m using 1.7.3 trying to delete orders and its only deleting 10 at a time. Maybe that big stick is needed.

    Same here, only 10 orders at a time – the issue persists with the new version, unfortunately.

    Hi @mintjelly and @aand, just to confirm that is the while looper that’s failing can you add the following PHP snippet to your Theme’s functions.php

    function custom_woo_st_clear_dataset_order( $args ) {
    $args[‘numberposts’] = -1;
    return $args;
    }
    add_filter( ‘woo_st_clear_dataset_order’, ‘custom_woo_st_clear_dataset_order’ );

    I have the latest version installed, and have the code in my functions.php

    It’s still deleting 10 at a time.

    *headsmack*

    numberposts vs posts_per_page when using WP_Query instead of get_posts()… pushing a release now

    To override the Order count this is the working PHP snippet:

    function custom_woo_st_clear_dataset_order( $args ) {
    $args[‘posts_per_page’] = -1;
    return $args;
    }
    add_filter( ‘woo_st_clear_dataset_order’, ‘custom_woo_st_clear_dataset_order’ );
Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Nuke will only delete 10 items’ is closed to new replies.