Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

ipokkel
Copy link
Member

@ipokkel ipokkel commented Sep 15, 2023

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:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

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

Copy link
Member

@ideadude ideadude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Small typo. Need to test further but looks good.

pmpro-woocommerce.php Outdated Show resolved Hide resolved
@ipokkel ipokkel marked this pull request as ready for review April 8, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Support Global Discount on Products in Network / Multisite Membership Environment
3 participants