Version Description
- 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.
- BUG FIX/PERFORMANCE: No longer enqueueing frontend.blocks.js which had no functional code, but loaded a lot of Gutenberg JS that wasn't needed on the frontend. When/if our blogs have frontend JS, we will load it again, but also make sure the dependencies are correct.
- BUG FIX/PERFORMANCE: No longer loading blocks.style.css. These frontend styles were redundant with CSS in css/frontend.css.
- NOTE: The SVN repository was missing the 2.0.3 tag when that update went out. Some users may have updated or tried to update and not gotten the correct files for 2.0.3. Everyone should update to 2.0.4, which is Gucci.
Download this release
Release Info
Developer | strangerstudios |
Plugin | Paid Memberships Pro |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- CHANGELOG.txt +8 -0
- blocks/blocks.php +5 -30
- includes/capabilities.php +1 -1
- includes/filters.php +3 -3
- includes/init.php +0 -20
- paid-memberships-pro.php +2 -2
- readme.txt +9 -1
- shortcodes/pmpro_account.php +1 -1
CHANGELOG.txt
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
== Changelog ==
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 2.0.3 - 2019-01-11 =
|
4 |
* BUG FIX: Fixed issue where code in the Stripe gateway was cancelling old subscriptions early if users renewed with a different gateway. NOTE: There was a fix for this in version 2.0, but it wasn't implemented fully.
|
5 |
* BUG FIX: Filtering pmpro_other_order_ids_to_cancel to make sure the current checkout's order doesn't get cancelled. This started happening in version 2.0 since we started setting the user_id on orders for existing users before the checkout was fully processed. This fix along with the one above and others will fix cases where users were being cancelled immediately after checkout.
|
1 |
== Changelog ==
|
2 |
|
3 |
+
= 2.0.4 - 2019-01-11 =
|
4 |
+
* BUG FIX: Fixed warning in code added in 2.0.3 that could cause issues at checkout.
|
5 |
+
* BUG FIX: Setting priority of pmpro_check_admin_capabilities to 5 to ensure it runs before dashboard redirect.
|
6 |
+
* BUG FIX: Removed duplicate id attribute on the Membership Account page "cancel" action link.
|
7 |
+
* BUG FIX/PERFORMANCE: No longer enqueueing frontend.blocks.js which had no functional code, but loaded a lot of Gutenberg JS that wasn't needed on the frontend. When/if our blogs have frontend JS, we will load it again, but also make sure the dependencies are correct.
|
8 |
+
* BUG FIX/PERFORMANCE: No longer loading blocks.style.css. These frontend styles were redundant with CSS in css/frontend.css.
|
9 |
+
* NOTE: The SVN repository was missing the 2.0.3 tag when that update went out. Some users may have updated or tried to update and not gotten the correct files for 2.0.3. Everyone should update to 2.0.4, which is Gucci.
|
10 |
+
|
11 |
= 2.0.3 - 2019-01-11 =
|
12 |
* BUG FIX: Fixed issue where code in the Stripe gateway was cancelling old subscriptions early if users renewed with a different gateway. NOTE: There was a fix for this in version 2.0, but it wasn't implemented fully.
|
13 |
* BUG FIX: Filtering pmpro_other_order_ids_to_cancel to make sure the current checkout's order doesn't get cancelled. This started happening in version 2.0 since we started setting the user_id on orders for existing users before the checkout was fully processed. This fix along with the one above and others will fix cases where users were being cancelled immediately after checkout.
|
blocks/blocks.php
CHANGED
@@ -45,43 +45,18 @@ add_filter( 'block_categories', 'pmpro_place_blocks_in_panel', 10, 2 );
|
|
45 |
function pmpro_block_editor_scripts() {
|
46 |
// Enqueue the bundled block JS file.
|
47 |
wp_enqueue_script(
|
48 |
-
'pmpro-blocks-js',
|
49 |
plugins_url( 'js/editor.blocks.js', PMPRO_BASE_FILE ),
|
50 |
array('wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-api', 'wp-editor'),
|
51 |
PMPRO_VERSION
|
52 |
);
|
53 |
|
54 |
-
/*
|
55 |
// Enqueue optional editor only styles.
|
56 |
wp_enqueue_style(
|
57 |
-
'pmpro-editor-css',
|
58 |
-
plugins_url(
|
59 |
-
array(
|
60 |
-
PMPRO_VERSION )
|
61 |
-
);
|
62 |
-
*/
|
63 |
-
}
|
64 |
-
add_action( 'enqueue_block_editor_assets', 'pmpro_block_editor_scripts' );
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Enqueue front end and editor JavaScript and CSS
|
68 |
-
*/
|
69 |
-
function pmpro_block_scripts() {
|
70 |
-
// Enqueue the bundled block JS file.
|
71 |
-
wp_enqueue_script(
|
72 |
-
'pmpro-blocks-frontend-js',
|
73 |
-
plugins_url( 'js/frontend.blocks.js', PMPRO_BASE_FILE ),
|
74 |
-
array( 'wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-api' ),
|
75 |
-
PMPRO_VERSION
|
76 |
-
);
|
77 |
-
|
78 |
-
// Enqueue frontend and editor block styles.
|
79 |
-
wp_enqueue_style(
|
80 |
-
'pmpro-blocks-css',
|
81 |
-
plugins_url( 'css/blocks.style.css', PMPRO_BASE_FILE ),
|
82 |
-
array( 'wp-blocks' ),
|
83 |
PMPRO_VERSION
|
84 |
);
|
85 |
-
|
86 |
}
|
87 |
-
add_action( '
|
45 |
function pmpro_block_editor_scripts() {
|
46 |
// Enqueue the bundled block JS file.
|
47 |
wp_enqueue_script(
|
48 |
+
'pmpro-blocks-editor-js',
|
49 |
plugins_url( 'js/editor.blocks.js', PMPRO_BASE_FILE ),
|
50 |
array('wp-i18n', 'wp-element', 'wp-blocks', 'wp-components', 'wp-api', 'wp-editor'),
|
51 |
PMPRO_VERSION
|
52 |
);
|
53 |
|
|
|
54 |
// Enqueue optional editor only styles.
|
55 |
wp_enqueue_style(
|
56 |
+
'pmpro-blocks-editor-css',
|
57 |
+
plugins_url( 'css/blocks.editor.css', PMPRO_BASE_FILE ),
|
58 |
+
array(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
PMPRO_VERSION
|
60 |
);
|
|
|
61 |
}
|
62 |
+
add_action( 'enqueue_block_editor_assets', 'pmpro_block_editor_scripts' );
|
includes/capabilities.php
CHANGED
@@ -19,7 +19,7 @@ function pmpro_check_admin_capabilities()
|
|
19 |
pmpro_set_capabilities_for_role('administrator');
|
20 |
}
|
21 |
}
|
22 |
-
add_action('admin_init', 'pmpro_check_admin_capabilities',
|
23 |
|
24 |
// use the capability definition for $role_name and add/remove capabilities as requested
|
25 |
function pmpro_set_capabilities_for_role( $role_name, $action = 'enable' )
|
19 |
pmpro_set_capabilities_for_role('administrator');
|
20 |
}
|
21 |
}
|
22 |
+
add_action('admin_init', 'pmpro_check_admin_capabilities', 5, 2);
|
23 |
|
24 |
// use the capability definition for $role_name and add/remove capabilities as requested
|
25 |
function pmpro_set_capabilities_for_role( $role_name, $action = 'enable' )
|
includes/filters.php
CHANGED
@@ -251,11 +251,11 @@ add_action( 'pmpro_checkout_before_change_membership_level', 'pmpro_set_checkout
|
|
251 |
*/
|
252 |
function pmpro_ignore_checkout_order_when_cancelling_old_orders( $order_ids ) {
|
253 |
global $pmpro_checkout_order;
|
254 |
-
|
255 |
-
if ( ! empty( $pmpro_checkout_order ) ) {
|
256 |
$order_ids = array_diff( $order_ids, array( $pmpro_checkout_order->id ) );
|
257 |
}
|
258 |
-
|
259 |
return $order_ids;
|
260 |
}
|
261 |
add_filter( 'pmpro_other_order_ids_to_cancel', 'pmpro_ignore_checkout_order_when_cancelling_old_orders' );
|
251 |
*/
|
252 |
function pmpro_ignore_checkout_order_when_cancelling_old_orders( $order_ids ) {
|
253 |
global $pmpro_checkout_order;
|
254 |
+
|
255 |
+
if ( ! empty( $pmpro_checkout_order ) && ! empty( $pmpro_checkout_order->id ) ) {
|
256 |
$order_ids = array_diff( $order_ids, array( $pmpro_checkout_order->id ) );
|
257 |
}
|
258 |
+
|
259 |
return $order_ids;
|
260 |
}
|
261 |
add_filter( 'pmpro_other_order_ids_to_cancel', 'pmpro_ignore_checkout_order_when_cancelling_old_orders' );
|
includes/init.php
CHANGED
@@ -8,9 +8,6 @@ function pmpro_init() {
|
|
8 |
require_once(PMPRO_DIR . '/includes/states.php');
|
9 |
require_once(PMPRO_DIR . '/includes/currencies.php');
|
10 |
|
11 |
-
// Block styles loaded early in frontend and dashboard.
|
12 |
-
wp_enqueue_style( 'pmpro_blocks_style', plugins_url( 'css/blocks.style.css', dirname(__FILE__), array(), PMPRO_VERSION, 'screen' ) );
|
13 |
-
|
14 |
if( is_admin() ) {
|
15 |
// Admin scripts and styles. We could use the admin_enqueue_scripts, but this works too.
|
16 |
|
@@ -26,9 +23,6 @@ function pmpro_init() {
|
|
26 |
));
|
27 |
wp_enqueue_script( 'pmpro_admin' );
|
28 |
|
29 |
-
// Block styles loaded in the editor only.
|
30 |
-
wp_enqueue_style( 'pmpro_blocks_editor', plugins_url( 'css/blocks.editor.css', dirname(__FILE__), array(), PMPRO_VERSION, 'screen' ) );
|
31 |
-
|
32 |
$admin_css_rtl = false;
|
33 |
if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/css/admin.css")) {
|
34 |
$admin_css = get_stylesheet_directory_uri() . "/paid-memberships-pro/css/admin.css";
|
@@ -157,20 +151,6 @@ function pmpro_wp()
|
|
157 |
{
|
158 |
global $pmpro_page_name;
|
159 |
$temp_content = pmpro_loadTemplate($pmpro_page_name, 'local', 'pages');
|
160 |
-
|
161 |
-
/*
|
162 |
-
ob_start();
|
163 |
-
|
164 |
-
if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php"))
|
165 |
-
include(get_stylesheet_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php");
|
166 |
-
elseif(file_exists(get_template_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php"))
|
167 |
-
include(get_template_directory() . "/paid-memberships-pro/pages/" . $pmpro_page_name . ".php");
|
168 |
-
else
|
169 |
-
include(PMPRO_DIR . "/pages/" . $pmpro_page_name . ".php");
|
170 |
-
|
171 |
-
$temp_content = ob_get_contents();
|
172 |
-
// ob_end_clean();
|
173 |
-
*/
|
174 |
return apply_filters("pmpro_pages_shortcode_" . $pmpro_page_name, $temp_content);
|
175 |
}
|
176 |
add_shortcode("pmpro_" . $pmpro_page_name, "pmpro_pages_shortcode");
|
8 |
require_once(PMPRO_DIR . '/includes/states.php');
|
9 |
require_once(PMPRO_DIR . '/includes/currencies.php');
|
10 |
|
|
|
|
|
|
|
11 |
if( is_admin() ) {
|
12 |
// Admin scripts and styles. We could use the admin_enqueue_scripts, but this works too.
|
13 |
|
23 |
));
|
24 |
wp_enqueue_script( 'pmpro_admin' );
|
25 |
|
|
|
|
|
|
|
26 |
$admin_css_rtl = false;
|
27 |
if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/css/admin.css")) {
|
28 |
$admin_css = get_stylesheet_directory_uri() . "/paid-memberships-pro/css/admin.css";
|
151 |
{
|
152 |
global $pmpro_page_name;
|
153 |
$temp_content = pmpro_loadTemplate($pmpro_page_name, 'local', 'pages');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
return apply_filters("pmpro_pages_shortcode_" . $pmpro_page_name, $temp_content);
|
155 |
}
|
156 |
add_shortcode("pmpro_" . $pmpro_page_name, "pmpro_pages_shortcode");
|
paid-memberships-pro.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Paid Memberships Pro
|
4 |
* Plugin URI: https://www.paidmembershipspro.com
|
5 |
* Description: The most complete member management and membership subscriptions plugin for WordPress.
|
6 |
-
* Version: 2.0.
|
7 |
* Author: Stranger Studios
|
8 |
* Author URI: https://www.strangerstudios.com
|
9 |
* Text Domain: paid-memberships-pro
|
@@ -16,7 +16,7 @@
|
|
16 |
*/
|
17 |
|
18 |
// version constant
|
19 |
-
define( 'PMPRO_VERSION', '2.0.
|
20 |
define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
|
21 |
define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
|
22 |
|
3 |
* Plugin Name: Paid Memberships Pro
|
4 |
* Plugin URI: https://www.paidmembershipspro.com
|
5 |
* Description: The most complete member management and membership subscriptions plugin for WordPress.
|
6 |
+
* Version: 2.0.4
|
7 |
* Author: Stranger Studios
|
8 |
* Author URI: https://www.strangerstudios.com
|
9 |
* Text Domain: paid-memberships-pro
|
16 |
*/
|
17 |
|
18 |
// version constant
|
19 |
+
define( 'PMPRO_VERSION', '2.0.4' );
|
20 |
define( 'PMPRO_USER_AGENT', 'Paid Memberships Pro v' . PMPRO_VERSION . '; ' . site_url() );
|
21 |
define( 'PMPRO_MIN_PHP_VERSION', '5.6' );
|
22 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: strangerstudios
|
|
3 |
Tags: membership, memberships, member, members, ecommerce, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
|
4 |
Requires at least: 4
|
5 |
Tested up to: 5.0.3
|
6 |
-
Stable tag: 2.0.
|
7 |
|
8 |
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
|
9 |
|
@@ -129,6 +129,14 @@ Not sure? You can find out by doing a bit a research.
|
|
129 |
|
130 |
== Changelog ==
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
= 2.0.3 - 2019-01-11 =
|
133 |
* BUG FIX: Fixed issue where code in the Stripe gateway was cancelling old subscriptions early if users renewed with a different gateway. NOTE: There was a fix for this in version 2.0, but it wasn't implemented fully.
|
134 |
* BUG FIX: Filtering pmpro_other_order_ids_to_cancel to make sure the current checkout's order doesn't get cancelled. This started happening in version 2.0 since we started setting the user_id on orders for existing users before the checkout was fully processed. This fix along with the one above and others will fix cases where users were being cancelled immediately after checkout.
|
3 |
Tags: membership, memberships, member, members, ecommerce, e-commerce, paypal, stripe, braintree, authorize.net, payflow, restrict access, restrict content, directory
|
4 |
Requires at least: 4
|
5 |
Tested up to: 5.0.3
|
6 |
+
Stable tag: 2.0.4
|
7 |
|
8 |
Get Paid with Paid Memberships Pro: The most complete member management and membership subscriptions plugin for your WordPress site.
|
9 |
|
129 |
|
130 |
== Changelog ==
|
131 |
|
132 |
+
= 2.0.4 - 2019-01-14 =
|
133 |
+
* BUG FIX: Fixed warning in code added in 2.0.3 that could cause issues at checkout.
|
134 |
+
* BUG FIX: Setting priority of pmpro_check_admin_capabilities to 5 to ensure it runs before dashboard redirect.
|
135 |
+
* BUG FIX: Removed duplicate id attribute on the Membership Account page "cancel" action link.
|
136 |
+
* BUG FIX/PERFORMANCE: No longer enqueueing frontend.blocks.js which had no functional code, but loaded a lot of Gutenberg JS that wasn't needed on the frontend. When/if our blogs have frontend JS, we will load it again, but also make sure the dependencies are correct.
|
137 |
+
* BUG FIX/PERFORMANCE: No longer loading blocks.style.css. These frontend styles were redundant with CSS in css/frontend.css.
|
138 |
+
* NOTE: The SVN repository was missing the 2.0.3 tag when that update went out. Some users may have updated or tried to update and not gotten the correct files for 2.0.3. Everyone should update to 2.0.4, which is Gucci.
|
139 |
+
|
140 |
= 2.0.3 - 2019-01-11 =
|
141 |
* BUG FIX: Fixed issue where code in the Stripe gateway was cancelling old subscriptions early if users renewed with a different gateway. NOTE: There was a fix for this in version 2.0, but it wasn't implemented fully.
|
142 |
* BUG FIX: Filtering pmpro_other_order_ids_to_cancel to make sure the current checkout's order doesn't get cancelled. This started happening in version 2.0 since we started setting the user_id on orders for existing users before the checkout was fully processed. This fix along with the one above and others will fix cases where users were being cancelled immediately after checkout.
|
shortcodes/pmpro_account.php
CHANGED
@@ -69,7 +69,7 @@ function pmpro_shortcode_account($atts, $content=null, $code="")
|
|
69 |
if(count($pmpro_levels) > 1 && !defined("PMPRO_DEFAULT_LEVEL")) { ?>
|
70 |
<a id="pmpro_actionlink-change" href="<?php echo pmpro_url("levels")?>" id="pmpro_account-change"><?php _e("Change", 'paid-memberships-pro' );?></a>
|
71 |
<?php } ?>
|
72 |
-
<a id="pmpro_actionlink-cancel" href="<?php echo pmpro_url("cancel", "?levelstocancel=" . $level->id)?>"
|
73 |
<?php do_action("pmpro_member_action_links_after"); ?>
|
74 |
</div> <!-- end pmpro_actionlinks -->
|
75 |
</td>
|
69 |
if(count($pmpro_levels) > 1 && !defined("PMPRO_DEFAULT_LEVEL")) { ?>
|
70 |
<a id="pmpro_actionlink-change" href="<?php echo pmpro_url("levels")?>" id="pmpro_account-change"><?php _e("Change", 'paid-memberships-pro' );?></a>
|
71 |
<?php } ?>
|
72 |
+
<a id="pmpro_actionlink-cancel" href="<?php echo pmpro_url("cancel", "?levelstocancel=" . $level->id)?>"><?php _e("Cancel", 'paid-memberships-pro' );?></a>
|
73 |
<?php do_action("pmpro_member_action_links_after"); ?>
|
74 |
</div> <!-- end pmpro_actionlinks -->
|
75 |
</td>
|