Closed mattallan closed 1 month ago
@james-allan as per our slack discussion I've have just pushed up a0365c1611bc4219d12dfe442d8730ec60c4cd43 to check the product is a subscription :) Thanks for the suggestion
Looks good. I just added an extra test for verifying that simple products are excluded from the function.
Thanks @james-allan, in the spirit of adding more unit tests, I also added another unit test that ensures line item quantities are handled properly 👍
Merging!
Needed for testing: 4656-gh-woocommerce/woocommerce-subscriptions
Description
This PR turns a private function found in our V3 Subscriptions Controller class into a public helper function:
wcs_set_recurring_item_total()
.This function is used by both V2 and V3 Subscriptions API Controller classes when implementing the
POST orders/123/subscriptions
endpoint and is used to make sure the order items copied from the parent order over to the subscription have the correct recurring totals (i.e. the totals do not include sign-up fees or are $0 due to the product including a trial period)Product impact