automatewoo-subscriptions
                                
                                 automatewoo-subscriptions copied to clipboard
                                
                                    automatewoo-subscriptions copied to clipboard
                            
                            
                            
                        Carrying over the quantity of existing line items to new line items
From a customer:
My sequential workflow works well, but only if I've only got a single item in the order. Any suggestions for how to handle things if someone wants to order two of the 1-month subscription boxes?
Rephrasing: the customer purchases product A, then when product B gets added to the subscription, we want to use the same line item quantity for Product B as the quantity paid for with product A.
There is currently no way to change a subscription product, and use the quantity of a product previously on the subscription.
A fairly common request from customers is to create sequential subscriptions, where a customer receives a series of items based on their sign-up date, or seasonal subscriptions, where a customer receives a different item each week or month, again, based on
There are two broad approaches to achieve this:
- New Replace/Change Product action: this can be used to replace one product with another, and carry over some of the aspects of it, like quantity, price, and potentially meta data.
- Line Item data variable/s: this can be used to derive the quantity (and possibly other data) from a different line item (likely filtered by product ID) on the subscription.
The former is the simplest approach, and likely easiest to understand. But the later is needed in the case where the subscription product is kept on the subscription over its whole lifecycle, and additional products are added/removed on top of that. Keeping the original product on the subscription is a good approach, because it ensures reports are accurate (e.g. if you want to see total revenue for that subscription product). To do that, you'd need to get the quantity from one line item and apply it to the other.
Another approach would be to setup Each Line Item subscription triggers like we have on most Order triggers. That would allow access to specific line item variables.
Another idea is to have a way to inherit or copy data from one line item to another via a new fields on the _Add Product action. For example, add a new Inherit Quantity checkbox and when that's chosen, display a select field for the store manager to choose the product to inherit from.
New Each Line Item triggers, like a Subscription Renewal Payment Complete - Each Line Item trigger will likely be the best solution to this.
~~We'd need to add a new Subscription Line Item - Product ID rule to filter the workflow to only the specific product/s to support that too.~~
Update: the Product is rule can be used to filter the line item. \AutomateWoo\Rules\Product
We can probably apply reuse the order_item data type for subscriptions. Existing rules and variables should be compatible but we'll need to confirm that.
I think these new triggers can go in AW core. What do think?
I think in general it makes sense to add most new subscriptions functionality to this add-on. But if you think these triggers are warranted in core, I'm totally fine with adding them there.
My thinking is that the add-on should contain advanced or edge case functionality. I think for these triggers it makes sense to have them in core since we already have the order each line item triggers there.
OK let's do them in core. I'll open an issue there and close this one. 👍