• Resolved uniqcode

    (@uniqcode)


    Hi
    The “Renumerate” tool (that is clunky English – it would be better called “Renumber”) does not renumber past Subscriptions.

    When a new subscription is taken out, the parent order and the subscription are correctly given sequential numbers by your plugin, just as they would have without it. But the Renumerate tool only renumbers the parent orders, leaving the subscriptions alone. That could cause a future subscription or order to end up with the same number as a past subscription.

    The following simple change will fix the problem:

    
    --- a/includes/class-alg-wc-custom-order-numbers-core.php
    +++ b/includes/class-alg-wc-custom-order-numbers-core.php
    @@ -259,7 +259,7 @@ if ( ! class_exists( 'Alg_WC_Custom_Order_Numbers_Core' ) ) :
                            $block_size        = 512;
                            while ( true ) {
                                    $args = array(
    -                                       'post_type'      => 'shop_order',
    +                                       'post_type'      => array('shop_order', 'shop_subscription'),
                                            'post_status'    => 'any',
                                            'posts_per_page' => $block_size,
                                            'orderby'        => 'date',
    

    Thank you for the plugin!

    • This topic was modified 5 years, 4 months ago by uniqcode.
    • This topic was modified 5 years, 4 months ago by uniqcode.
    • This topic was modified 5 years, 4 months ago by uniqcode.
Viewing 1 replies (of 1 total)
  • Plugin Support kenil802

    (@kenil802)

    Hi @uniqcode,

    Thank you for sharing the solution with us. I will pass your solution to our developer and we will see what we can do about this.

    Regards,
    Kenil Shah

Viewing 1 replies (of 1 total)

The topic ‘Renumerate tool and subscriptions’ is closed to new replies.