• Resolved duffy1721

    (@duffy1721)


    Hi

    I see that when trying to clone an old order (before price change from last year) that the price on the cloned order does not update to the current price but reflects the original price form last year.

    I have even performed a refresh with no joy.

    Order from 9/11/2024

    Items Subtotal: R281.74 Shipping: R0.00 Tax: R42.26 Order Total: R324.00

    Cloned order today

    Items Subtotal: R281.74 Shipping: R0.00 Tax: R42.26 Order Total: R324.00

    Should be:

    Items Subtotal: R295.65 Shipping: R0.00 Tax: R44.35 Order Total: R340.00

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support James Hunt

    (@bonkerz)

    Hi

    Thanks for the feedback and reporting this issue.

    The default setting is to clone the original price, as this is a clone action.

    What you want is clone + update to latest pricing.

    That is not possible with the current version of the plugin, but I believe it is possible. I will get this added for you via a filter option. Give me 24-48 hours and I will get a new version released.

    Plugin Support James Hunt

    (@bonkerz)

    @duffy1721 We have finally released version 1.0.8 which adds filters to the clone process.

    To make all clone operations use the latest pricing (clone + update) rather than original pricing you can add the following to your themes functions.php or add to your site via Code Snippet.

    /**
    * Use current product prices instead of the original product price when cloning
    *
    * Filtering Clone / Duplicate Orders for WooCommerce
    */
    add_filter( ‘cdo_wc_clone_use_current_price’, ‘__return_true’ );

    Hope this helps and let us know if this solves your issue!

    Thanks

    Thread Starter duffy1721

    (@duffy1721)

    Thank you

    I Have used your code as provided, and report this error:

    “An error occurred while saving your changes. Please try again. If the problem persists, you may need to manually update the file via http://FTP.”

    Added at end of functions.php file

    }
    add_filter( ‘woocommerce_cart_ready_to_calc_shipping’, ‘remove_shipping_calc_on_cart’, 99 );
    add_filter( ‘cdo_wc_clone_use_current_price’, ‘__return_true’ );
    ?>

    Plugin Support James Hunt

    (@bonkerz)

    Apologies, copy and paste error it seems – the apostrophes were not correct

    /**
    * Use current product prices instead of the original product price when cloning
    *
    * Filtering Clone / Duplicate Orders for WooCommerce
    */
    add_filter( 'cdo_wc_clone_use_current_price', '__return_true' );

    Looking at the code you copy and pasted, you should review the other code snippet too regarding removing the shipping totals to make sure the apostrophes are straight ' and not like this ’

    Thread Starter duffy1721

    (@duffy1721)

    Thank you. That works great.

    One last request if I may?

    Our price already includes Tax. When I duplicate an order, the new order now adds tax.

    Is there any way to not add tax to the cloned order? Sorry to be a nuisance and thank you once again for all your work

    Plugin Support James Hunt

    (@bonkerz)

    @duffy1721 Ah OK, you have discovered a bug! We have now fixed that in version 1.0.9, released now. Please update and the code provided should now work without the tax being added. Let me know if that solves this for you.

    Plugin Support James Hunt

    (@bonkerz)

    As I’ve not heard from you on this I am closing this ticket, if the problem is solved let me know via a Review!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Price on cloned order is not updating the price to the latest’ is closed to new replies.