strangerstudios / pmpro-woocommerce

Connect Paid Memberships Pro with WooCommerce and WooCommerce Subscriptions to sell membership products and offer members-only product discounts.
https://www.paidmembershipspro.com/add-ons/pmpro-woocommerce/
46 stars 32 forks source link

Autocomplete for Variable Products #108

Closed ideadude closed 1 year ago

ideadude commented 5 years ago

This test is failing for variable products because the autocomplete meta value is stored on the parent product and not the variable.

https://github.com/strangerstudios/pmpro-woocommerce/blob/master/pmpro-woocommerce.php#L886

We could update this code to look for the meta value on the parent product if the product is variable: https://github.com/strangerstudios/pmpro-woocommerce/blob/master/pmpro-woocommerce.php#L883

Related: Some users may want to select a different membership level based on which variable was selected. This would require more work and should not be considered part of this issue.

ideadude commented 5 years ago

Another spot where we could/should check for a variable product: https://github.com/strangerstudios/pmpro-woocommerce/blob/master/pmpro-woocommerce.php#L150