TycheSoftwares / custom-order-numbers-for-woocommerce

This repository is for the Custom Order Numbers for WooCommerce- Lite
2 stars 2 forks source link

Renumerate tool and subscriptions #39

Closed kenil802 closed 2 years ago

kenil802 commented 3 years ago

The client has shared a fix where the renumerate numbers do not renumber the past subscriptions.

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(

Link: https://wordpress.org/support/topic/renumerate-tool-and-subscriptions/#post-13842603

apeksha10 commented 2 years ago

Re-opening this issue

  1. Install and activate the WooCommerce Subscription plugin
  2. Create a subscription product
  3. Placed an order. Previously I have this setup. https://www.screencast.com/t/ne3tHXsK5T
  4. Go to the subscription order tab, the order are appear fine to me
  5. Now, I have the Order numbers counter from "Pseudorandom" to "Sequential" subscription order does not get change https://www.screencast.com/t/5GsOzD1n2g6

Hence I have re-open this issue

apeksha10 commented 2 years ago

After clicking on the "Remunerate tool" button the things are working fine see the screenshot: https://www.screencast.com/t/oqcLXwlmhn0n

Hence, I have closed the issue and put a fixed label.