Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Sep 13, 2019
2 parents 57271bb + 8219275 commit 5959686
Show file tree
Hide file tree
Showing 218 changed files with 18,279 additions and 8,184 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.babelrc export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.github export-ignore
.gitignore export-ignore
package-lock.json export-ignore
package.json export-ignore
Expand Down
File renamed without changes.
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!-- This form is for reporting bugs and issues specific to the Paid Memberships Pro plugin. This is not a support portal. If you need technical support from a human being, please submit a ticket via the helpdesk instead: https://www.paidmembershipspro.com/support/ -->

<!-- Usage questions can also be directed to the public support forum here: https://wordpress.org/support/plugin/paid-memberships-pro, unless this is a question about a premium extension in which case you should use the helpdesk. -->

<!-- If you are a developer who needs a new filter/hook raise a PR instead :) -->

<!-- Please be as descriptive as possible; issues lacking the below details, or for any other reason than to report a bug, may be closed without action. -->

## Prerequisites

<!-- MARK COMPLETED ITEMS WITH AN [x] -->

- [ ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [ ] The issue still exists against the latest `dev` branch of Paid Memberships Pro on Github (this is **not** the same version as on WordPress.org!)
- [ ] I have attempted to find the simplest possible steps to reproduce the issue

## Steps to reproduce the issue

<!-- We need to be able to reproduce the bug in order to fix it so please be descriptive! -->

1.
2.
3.

## Expected/actual behavior

When I follow those steps, I see...

I was expecting to see...

## Isolating the problem

<!-- MARK COMPLETED ITEMS WITH AN [x] -->

- [ ] This bug happens with only Paid Memberships Pro plugin active
- [ ] This bug happens with a default WordPress theme active, or [Memberlite](https://wordpress.org/themes/memberlite/)
- [ ] I can reproduce this bug consistently using the steps above

## WordPress Environment

<details>
```
Please share non-sensitive information about your hosting environment such as WordPress version, PHP version, Paid Memberships Pro and any related plugins versions.
```
</details>
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: "🐛 Bug Report"
about: Report a bug if something isn't working as expected in Paid Memberships Pro.
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed or left unattended.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots**
If applicable, please attach a screenshot to make your issue clearer.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Isolating the problem (mark completed items with an [x]):**
- [ ] I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
- [ ] This bug happens with a default WordPress theme active, or [Memberlite](https://wordpress.org/themes/memberlite/).
- [ ] I can reproduce this bug consistently using the steps above.

**WordPress Environment**
<details>
```
Please share non-sensitive information about your hosting environment such as WordPress version, PHP version, Paid Memberships Pro and any related plugins versions.
```
</details>
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "⭐️ Enhancement"
about: If you have an idea to improve an existing feature or need something
for development (such as a new hook) please let us know or submit a Pull Request.
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
If applicable, add any other context or screenshots about the enhancement here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: "➕ Feature Request"
about: "Suggest a new feature. We'll consider building it if it receives
sufficient interest!"
title: ''
labels: 'feature request'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
If applicable, add any other context or screenshots about your feature request here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "💬 Support Question"
about: "If you have a question, please see our docs or use our helpdesk."
title: ''
labels: 'Type: support'
assignees: ''

---

We don't offer technical support on GitHub so we recommend using the following:

**Reading our documentation**
Usage docs can be found here: https://www.paidmembershipspro.com/documentation/

**Technical support for premium extensions or if you're a Paid Memberships Pro Plus member**
Submit a ticket on our helpdesk by visiting https://www.paidmembershipspro.com/new-topic/ (Please note that an [active membership] (https://www.paidmembershipspro.com/pricing) is required for paid support.)

**General usage and development questions**
- WordPress.org Forums: https://wordpress.org/support/plugin/paid-memberships-pro
- Website: https://www.paidmembershipspro.com/contact/
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
### All Submissions:

* [ ] Have you followed the [Contributing guideline](CONTRIBUTING.MD)?
* [ ] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

<!-- Mark completed items with an [x] -->

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### Changes proposed in this Pull Request:

<!-- Describe the changes made to this Pull Request and the reason for such changes. -->

Closes Issue: XXX.

### How to test the changes in this Pull Request:

1.
2.
3.

### 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?

<!-- Mark completed items with an [x] -->

### Changelog entry

> Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ node_modules

# Log files
log/*.log
log/*.txt
log/*.txt
tests/_build
61 changes: 61 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
sudo: false
dist: trusty

language: php

notifications:
email:
on_success: never
on_failure: change

branches:
only:
- dev
- master
- /^v.*/

cache:
directories:
- vendor
- $HOME/.composer/cache

matrix:
include:
- php: 7.2
env: WP_VERSION=latest
- php: 7.1
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=latest

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
fi
script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
phpunit
WP_MULTISITE=0 phpunit
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs
fi
67 changes: 65 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
== Changelog ==

= 2.0.4 - 2019-01-11 =
= 2.1 - 2019-09-13 =
* FEATURE: Updated Stripe integration to support Stripe v3, Stripe Elements, and their Secure Customer Authorization process.
* FEATURE: Updated how we store prices to support up to 8 decimals (e.g. for Bitcoin gateway implementations).
* ENHANCEMENT: Improved error messaging on the update billing page when a gateway doesn't support it or the user's current membership doesn't have a subscription.
* ENHANCEMENT: Added a pmpro_is_checkout() function that will return true if on the PMPro checkout page or a page with the PMPro checkout shortcode or block.
* ENHANCEMENT: Showing a warning message when a user about to be deleted has a membership so admins know that existing subscriptions will be deleted at the gateway.
* ENHANCEMENT: Added a pmpro_braintree_plan_id filter in case you need to adjust plan IDs. This is useful if you have several sites running on the same Braintree account.
* ENHANCEMENT: Added a pmpro_num_expiration_years filter to adjust the number of years to include in the dropdown to set the year membership will expire.
* ENHANCEMENT: Tweaked the UI of the orders list and members list in the dashboard.
* ENHANCEMENT: Added pmpro_membership_levels_table_extra_cols_header and pmpro_membership_levels_table_extra_cols_body hooks to add columns to the members list.
* ENHANCEMENT: Showing notices to admins when categories are hidden from them on the frontend of the site.
* ENHANCEMENT: Added a pmpro_url filter to filter URLs returned from that function.
* ENHANCEMENT: Adding a pmpro_checkout_gateway-stripe or pmpro_checkout_gateway-paypal/etc CSS class to the wrapping div for payment fields to aid in styling.
* ENHANCEMENT: Using the site's date format option when printing orders.
* BUG FIX/ENHANCEMENT: If a site has no paying levels, the test gateway will show as the "Default" gateway and we will no longer show a message about requiring gateway setup on the checkout page.
* BUG FIX/ENHANCEMENT: Updated Russian Ruble definition to have 0 decimals and use &nbsp; as the thousands separator. (Thanks, Airat Halitov)
* BUG FIX/ENHANCEMENT: Using add_query_arg when generating IPN URLs to avoid issues on sites that aren't using pretty permalinks or have moved their admin directory.
* BUG FIX/ENHANCEMENT: Fixed issue on advanced settings page where clicking on labels didn't check the corresponding check boxes.
* BUG FIX/ENHANCEMENT: Updated our pmpro_generateUsername() function to be a bit smarter.
* BUG FIX/ENHANCEMENT: Now using wp_generate_password() when choosing a random password for a user (e.g. when using the Sign Up Shortcode add on or the $skip_account_fields global).
* BUG FIX/ENHANCEMENT: Setting autocomplete to false on the "fullname" honeypot field. This will prevent user's with certain autocomplete tools from accidentally filling it out.
* BUG FIX/EHNANCEMENT: Now sending name and email fields to PayPay (using Website Payments Pro) even if no address was captured.
* BUG FIX/ENHANCEMENT: More specific CSS selectors for checkout form elements to make sure errors are highlighted/etc with different themes.
* BUG FIX: Fixed issue where the first 2000 or so orders might be skipped when exporting orders on large sites.
* BUG FIX: Fixed issue with setting custom trials on discount codes.
* BUG FIX: Fixed issue in the SQL query in the pmpro_calculateInitialPaymentRevenue() function. This function is deprecated, but still used by some custom code.
* BUG FIX: Fixed issue where default templates would fail to load if a custom template was specified.
* BUG FIX: Fixed fatal errors that could happen when using the PMPro REST API endpoints.
* BUG FIX: Fixed bug where the invoices page would sometimes show data for the current (admin) users instead of the user the invoice was for.
* BUG FIX: Fixed bug where the membership stats graphs would sometimes show up blank.
* BUG FIX: Now falling back to using readfile() if fpassthru() doesn't existing.
* BUG FIX: Fixed issue where the from name and email were not set properly if the Only Filter PMPro Emails setting was checked. (Thanks, mjulian87 on GitHub)
* BUG FIX: Fixed several error handling issues with the Cybersource gateway integration.
* REFACTOR: Moved JavaScript out of pages/checkout.php and other places into files in the /js/ folder. This will avoid issues where other JS at checkout breaks PMPro checkout and will improve compatibility with tools that optimize JS.
* REFACTOR: Added unit testing and a started on coverage of some functions in includes/functions.php. (Thanks, Mike Auteri)
* REFACTOR: The JS function askfirst is now prefixed as pmpro_askfirst.

= 2.0.7 - 2019-05-30 =
* BUG FIX: Fixed issue where the profile start date would sometimes be set incorrectly on the Stripe subscription.
* BUG FIX: Fixed issue where the membership shortcode would not work properly if more than one level name was given.
* BUG FIX: Fixed issue where an incorrect email address was sometimes set in the confirm email field on the update billing page. (Thanks, Jessica Thomas)
* BUG FIX/ENHANCEMENT: Fixed placement of the hr tag above the user fields at checkout for consistency.
* ENHANCEMENT: Set the priority on the Require Membership meta box to "high" so it appears higher in the right sidebar.

= 2.0.6 - 2019-05-30 =
* SECURITY: Now using wp_safe_redirect when possible, especially in includes/login.php where the user-provided redirect_to URL parameter is used. (Thanks PluginVulnerabilities.com)

= 2.0.5 - 2019-04-25 =
* BUG FIX: Fixed fatal error on return from 2Checkout.
* BUG FIX: Removed error when installing PMPro via WP-CLI.
* BUG FIX: Fix database upgrade error on localhost environment. (Thanks, codezz on GitHub)
* BUG FIX: Fixed issue where the credit card expiring email didn't include user info because the user ID wasn't passed in properly. (Thanks, David Cervantes Caballero)
* BUG FIX: Fixed typo on edit level page. (Thanks, Theuns Coetzee)
* BUG FIX: Fixed bug with daily revenue reports not showing up in some cases.
* BUG FIX: Now checking before cancelling a Stripe subscription at the gateway to see if it has already been cancelled.
* BUG FIX/ENHANCEMENT: Now caching the query results in pmpro_getMembershipLevelsForUser(). This improves performance, especially when there are many posts on one page to check membership for. (Thanks, Seagyn Davis)
* BUG FIX/ENHANCEMENT: Now sending display_name to the $data array passed to PMPro email filters. (Thanks, David Cervantes Caballero)
* BUG FIX/ENHANCEMENT: Now searching for the last order with "success" or "pending" status on the Billing page.
* BUG FIX/ENHANCEMENT: Added pmpro_checkout_preheader_before_get_level_at_checkout and pmpro_checkout_preheader_after_get_level_at_checkout action hooks. Using pmpro_checkout_preheader_before_get_level_at_checkout to start the session earlier now.
* BUG FIX/ENHANCEMENT: Removed the "membership_code_id" and "membership_code" as field options for the member shortcode. These weren't working and it's unclear what would be meant to ask for a user's discount code since a user could have several orders with or without discount codes. Added "membership_description" and "membership_confirmation" instead.
* BUG FIX/ENHANCEMENT: Filtering the password reset message to make sure the link still works in all cases when we convert emails to HTML.
* BUG FIX/ENHANCEMENT: Added reCAPTCHA v3 and invisible reCAPTCHA support. It is recommended sites using Stripe or Braintree update to the reCAPTCHA v3 option. Read more here: https://www.paidmembershipspro.com/pmpro-update-2-0-5/
* REFACTOR: Now running the pmpro_billing_preheader hook after the jquery.creditCardValidator script is enqueued in preheader/billing.php to match how we do it in preheader/checkout.php. (Thanks, Rafe Colton)

= 2.0.4 - 2019-01-14 =
* BUG FIX: Fixed warning in code added in 2.0.3 that could cause issues at checkout.
* BUG FIX: Setting priority of pmpro_check_admin_capabilities to 5 to ensure it runs before dashboard redirect.
* BUG FIX: Removed duplicate id attribute on the Membership Account page "cancel" action link.
Expand Down Expand Up @@ -103,7 +167,6 @@
* ENHANCEMENT: Showing the Stripe version we use on the Payment Settings page.
* ENHANCEMENT: Updated Copyright date and GPLv2 link in license.txt.


= 1.9.5.3 - 2018-06-26 =
* BUG FIX: The pmpro_ipnhandler_extend_memberships function actually needed use $user_id instead of $current_user.

Expand Down
2 changes: 1 addition & 1 deletion adminpages/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$msgt .= " <a href=\"" . admin_url('admin.php?page=pmpro-membershiplevels&edit=-1') . "\">" . __("Add a membership level to get started.", 'paid-memberships-pro' ) . "</a>";
elseif($pmpro_level_ready && !$pmpro_pages_ready && $view != "pmpro-pagesettings")
$msgt .= " <strong>" . __( 'Next step:', 'paid-memberships-pro' ) . "</strong> <a href=\"" . admin_url('admin.php?page=pmpro-pagesettings') . "\">" . __("Set up the membership pages", 'paid-memberships-pro' ) . "</a>.";
elseif($pmpro_level_ready && $pmpro_pages_ready && !$pmpro_gateway_ready && $view != "pmpro-paymentsettings")
elseif($pmpro_level_ready && $pmpro_pages_ready && !$pmpro_gateway_ready && $view != "pmpro-paymentsettings" && ! pmpro_onlyFreeLevels())
$msgt .= " <strong>" . __( 'Next step:', 'paid-memberships-pro' ) . "</strong> <a href=\"" . admin_url('admin.php?page=pmpro-paymentsettings') . "\">" . __("Set up your SSL certificate and payment gateway", 'paid-memberships-pro' ) . "</a>.";

if(empty($msgt))
Expand Down
Loading

0 comments on commit 5959686

Please sign in to comment.