Skip to content

Commit

Permalink
Version bump and minor WPCS
Browse files Browse the repository at this point in the history
* Version bump and minor WPCS
  • Loading branch information
andrewlimaza committed Sep 14, 2022
1 parent fcb5d9e commit b933b22
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
11 changes: 6 additions & 5 deletions pmpro-pay-by-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
Plugin Name: Paid Memberships Pro - Pay by Check Add On
Plugin URI: https://www.paidmembershipspro.com/add-ons/pmpro-pay-by-check-add-on/
Description: A collection of customizations useful when allowing users to pay by check for Paid Memberships Pro levels.
Version: 0.10
Version: 0.11
Author: Stranger Studios
Author URI: https://www.paidmembershipspro.com
Text Domain: pmpro-pay-by-check
Domain Path: /languages
*/
/*
Sample use case: You have a paid level that you want to allow people to pay by check for.
Expand All @@ -23,8 +24,8 @@
/*
Settings, Globals and Constants
*/
define("PMPRO_PAY_BY_CHECK_DIR", dirname(__FILE__));
define("PMPROPBC_VER", '0.10');
define( 'PMPRO_PAY_BY_CHECK_DIR', dirname(__FILE__) );
define( 'PMPROPBC_VER', '0.11' );

/*
Load plugin textdomain.
Expand Down Expand Up @@ -419,7 +420,7 @@ function pmpropbc_pmpro_check_status_after_checkout($status)
/**
* Cancels all previously pending check orders if a user purchases the same level via a different payment method.
*
* @since TBD
* @since 0.11
*/
function pmpropbc_cancel_previous_pending_orders( $user_id, $order ) {
global $wpdb;
Expand All @@ -445,7 +446,7 @@ function pmpropbc_cancel_previous_pending_orders( $user_id, $order ) {

// Update any outstanding check payments for this level ID.
$SQLquery = "UPDATE $wpdb->pmpro_membership_orders
SET `status` = 'cancelled'
SET `status` = 'token'
WHERE `user_id` = " . esc_sql( $user_id ) . "
AND `gateway` = 'check'
AND `status` = 'pending'
Expand Down
11 changes: 9 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: strangerstudios, eighty20results
Tags: pmpro, paid memberships pro, members, memberships, check, cheque, payments, offline
Requires at least: 5.0
Tested up to: 5.9
Stable tag: 0.10
Tested up to: 6.0
Stable tag: 0.11

A collection of customizations useful when allowing users to pay by check for Paid Memberships Pro levels.

Expand Down Expand Up @@ -31,6 +31,13 @@ If you would like to change the wording from "Pay by Check" to something else, y
https://gist.github.com/strangerstudios/68bb75bf3b83530390d4

== Changelog ==
= 0.11 - 2022-09-14 =
* ENHANCEMENT: Tweaked the confirmation message on the confirmation page to clearly show that no access is available until payment is received.
* ENHANCEMENT: Improved cases where orders would stay in pending if members checked out for the same level but change their payment method. Previous orders now are set with the "token" status if switching gateways and had a pending status with check payment.
* BUG FIX: Improved compatibility for cases like Auto Renewal Checkbox where a level may have recurring and non-recurring options. This fixes an issue where non-recurring members would still be cancelled or receive renewal reminders.
* BUG FIX: Various fixes to support and improve compatibility with PHP8+ (Thanks @ZebulanStanphill, @jarrydlong).
* BUG FIX: Fixed an issue where [membership level="0"] would display incorrectly (Thanks @ipokkel)

= 0.10 - 2022-04-01 =
* ENHANCEMENT: Changed table layout to div instead for checkout payment method selection.
* ENHANCEMENT: Added in support for [membership] shortcode logic. Pending members will no longer gain access until approved.
Expand Down

0 comments on commit b933b22

Please sign in to comment.