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

Adds a filter to determine commission on subtotal or total #53

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

Conversation

JarrydLong
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Adds a filter to queries to determine if we should base commission off of the order subtotal (before tax) or total (after tax).

New filter is called pmpro_affiliates_calculate_on_subtotal and accepts a boolean value

How to test the changes in this Pull Request:

  1. Enable the filter add_filter( 'pmpro_affiliates_calculate_on_subtotal', '__return_true' );
  2. Run a test checkout with tax in place or edit an order that has earned an affiliate commission - your subtotal and total should be different
  3. Commission will be based on the subtotal when enabled

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?

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.

1 participant