pmpro-woocommerce icon indicating copy to clipboard operation
pmpro-woocommerce copied to clipboard

Enhancement: Get pmpro-woocommerce global variables from the main blog.

Open ipokkel opened this issue 2 years ago • 0 comments

All Submissions:

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:

  1. 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)
  2. 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.
  3. Log in as a member and navigate to the WooCommerce shop on a subsite in the multisite network.
  4. Select a product to open that product's page.
  5. 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.

ipokkel avatar Sep 15 '23 20:09 ipokkel