Open andrewlimaza opened 3 years ago
Please remove this because nobody like just for adding a membership to the cart discount at "X" percent of a single product before the client paid "that membership"
Do you can help me to add a function to disable this!.
@jpaezsa The idea here is to allow people to purchase the membership level and receive the discount associated with that level within a single checkout to ensure customer's don't need to do multiple checkouts to receive the discount.
I do think it would be a good idea to allow developers to turn this off.
The solution would be to add in a filter along the lines of pmpro_woo_cart_level_discount
that would allow you to turn this on/off.
For interest sake here's the logic - https://github.com/strangerstudios/pmpro-woocommerce/blob/257fdf04df38e5824d52e752fbd2978c4dfd29e2/pmpro-woocommerce.php#L420-L426
Currently, as of this writing, the Paid Memberships Pro - WooCommerce Integration should not discount membership products with the current level discount or the level product in the cart discount and currently takes the level product in the cart discount as a priority over the currently held membership level of the user.
This is not a feature request but more of a discussion for the community to engage in and help decide on a path forward. Please note that this may not ever be included in a future release of the Paid Memberships Pro WooCommerce Integration
Some steps to recreate this functionality:
The question here is, should we take the current user's level as a priority into consideration or the level in the cart? A guide may be created soon to support this change for user's that may be using Multiple Memberships Per User (MMPU) and want the current level held discount to take priority. Also with regards to MMPU, we should possibly figure out the highest discount rate and use that as a priority if a user has multiple levels at the same time.
Discounting membership products:
This may be an easier fix by adding in an option or filter (for developers) to allow membership product types to be discounted based on the user's level. This makes more sense if you apply the current user's membership level discount settings as a priority, which may allow existing member's a prorated value when 'upgrading' or 'downgrading' from their current membership level.