pmpro-woocommerce
pmpro-woocommerce copied to clipboard
Enhancement: Get pmpro-woocommerce global variables from the main blog.
All Submissions:
- [x] Have you followed the Contributing guidelines?
- [x] Does your code follow the WordPress' coding standards?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Changes proposed in this Pull Request:
When on a subsite in a multisite network retrieve the value for the $pmprowoo_product_levels, $pmprowoo_gift_codes, $pmprowoo_member_discounts, and $pmprowoo_discounts_on_subscriptions global variables from the main site if they are empty on the subsite.
Resolve #114 on condition that the Paid Memberships Pro - WooCommerce Add On is active on the main site and any subsite where the WooCommerce plugin is active.
How to test the changes in this Pull Request:
- Navigate to Plugins on the main site and Activate the Paid Memberships Pro - WooCommerce Add On (Activating the WooCommerce plugin on the main site is not required)
- Navigate to Memberships > Settings > Levels on the main site in the network and set a numerical value for the Membership Discount (%) option for each level and update level settings.
- Log in as a member and navigate to the WooCommerce shop on a subsite in the multisite network.
- Select a product to open that product's page.
- Observe that the discounted price for the user's membership level is displayed as the product price.
Other information:
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
- [x] Have you successfully run tests with your changes locally?
Changelog entry
Enhancement: Get pmpro-woocommerce global variables from the main blog.