From cdb5db415396e92c15f639437ad1515ba6b2c5c7 Mon Sep 17 00:00:00 2001 From: David Parker Date: Thu, 26 Sep 2024 12:38:48 -0400 Subject: [PATCH] 3.2 RC1 changelog and version numbers --- CHANGELOG.txt | 3 +- adminpages/emailtemplates.php | 2 +- adminpages/securitysettings.php | 4 +- classes/class-pmpro-field.php | 8 +-- classes/class.memberorder.php | 60 +++++++++---------- classes/gateways/class.pmprogateway.php | 26 ++++---- .../class.pmprogateway_authorizenet.php | 4 +- .../class.pmprogateway_paypalexpress.php | 18 +++--- .../gateways/class.pmprogateway_stripe.php | 2 +- includes/cloudflare-turnstile.php | 4 +- includes/deprecated.php | 16 ++--- includes/filters.php | 4 +- includes/functions.php | 4 +- includes/recaptcha.php | 8 +-- includes/terms-of-service.php | 38 ++++++------ package.json | 2 +- pages/checkout.php | 4 +- paid-memberships-pro.php | 4 +- preheaders/billing.php | 2 +- preheaders/checkout.php | 10 ++-- readme.txt | 5 +- scheduled/crons.php | 6 +- services/braintree-webhook.php | 4 +- 23 files changed, 120 insertions(+), 118 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7843eaca53..1445ac31f7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,5 @@ == Changelog == -= 3.2 - TBD = += 3.2 RC1 - 09-26-2024 = * FEATURE: Users will now receive a notification email when they have an upcoming subscription payment. #3109 (@dparker1005) * FEATURE: Added integration with Cloudflare Turnstile. #3123 (@andrewlimaza) * ENHANCEMENT: The business address for the website can now be set on the Advanced Settings page and will be shown on invoices. #3134 (@MaximilianoRicoTabo) @@ -11,6 +11,7 @@ * ENHANCEMENT: Now creating a user at checkout even when order creation checks fail. #3137 (@dparker1005) * ENHANCEMENT: Memberships on the Membership Account page will now be shown in the order set on the Membership Levels settings page. #3112 (@kimcoleman) * BUG FIX/ENHANCEMENT: Street2 billing address lines are now stored separately in the MemberOrder object. #3122 (@dparker1005) +* BUG FIX: Fixed an issue where payment fields on the update billing page might be wrapped in nested cards. #3143 (@kimcoleman) * REFACTOR: Abstracted all "Terms of Service" logic into a single file. #3119 (@dparker1005) * REFACTOR: Abstracted all reCAPTCHA logic into a single file. #3105 (@dparker1005) * REFACTOR: Cleaned up the checkout preheader flow including deprecating the `pmpro_build_order_for_checkout()` function in favor of inline logic. #3129 (@dparker1005) diff --git a/adminpages/emailtemplates.php b/adminpages/emailtemplates.php index ae267bfe9a..623f8cb98a 100644 --- a/adminpages/emailtemplates.php +++ b/adminpages/emailtemplates.php @@ -103,7 +103,7 @@ function( $key ) { /** * Filter the extra actions for this template. * - * @since TBD + * @since 3.2 * * @param array $actions The list of actions. * @param object $template The email template data. diff --git a/adminpages/securitysettings.php b/adminpages/securitysettings.php index 5e52bb9e31..1924af1a9e 100644 --- a/adminpages/securitysettings.php +++ b/adminpages/securitysettings.php @@ -32,7 +32,7 @@ /** * Fires after security settings are saved. * - * @since TBD + * @since 3.2 */ do_action( 'pmpro_save_security_settings' ); @@ -166,7 +166,7 @@ function pmpro_is_plugin_installed_or_active( $plugin_file ) { * Fires after the spam protection settings are displayed. * Can be used to add additional spam protection settings. * - * @since TBD + * @since 3.2 */ do_action( 'pmpro_security_spam_fields' ); ?> diff --git a/classes/class-pmpro-field.php b/classes/class-pmpro-field.php index ebcc451625..9b80920962 100755 --- a/classes/class-pmpro-field.php +++ b/classes/class-pmpro-field.php @@ -258,7 +258,7 @@ class PMPro_Field { /** * The default value for a field. * - * @since TBD + * @since 3.2 * * @var string */ @@ -267,7 +267,7 @@ class PMPro_Field { /** * File upload types. * - * @since TBD + * @since 3.2 * * @var string * @@ -277,7 +277,7 @@ class PMPro_Field { /** * File upload limit * - * @since TBD + * @since 3.2 * * @var int */ @@ -676,7 +676,7 @@ function getHTML($value = "") * @param string $value The default value for the field. * @param object $this The field object. * - * @since TBD + * @since 3.2 */ $value = apply_filters( 'pmpro_field_default_value', $this->default, $this ); } diff --git a/classes/class.memberorder.php b/classes/class.memberorder.php index 5dcaf32ba1..e600dc4fce 100644 --- a/classes/class.memberorder.php +++ b/classes/class.memberorder.php @@ -346,80 +346,80 @@ public function __get( $property ) { */ switch ( $property ) { case 'ExpirationDate': - _doing_it_wrong( __METHOD__, __( 'ExpirationDate is deprecated. Use expirationmonth and expirationyear instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'ExpirationDate is deprecated. Use expirationmonth and expirationyear instead.', 'paid-memberships-pro' ), '3.2' ); return $this->expirationmonth . $this->expirationyear; case 'ExpirationDate_YdashM': - _doing_it_wrong( __METHOD__, __( 'ExpirationDate_YdashM is deprecated. Use expirationyear and expirationmonth instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'ExpirationDate_YdashM is deprecated. Use expirationyear and expirationmonth instead.', 'paid-memberships-pro' ), '3.2' ); return $this->expirationyear . '-' . $this->expirationmonth; case 'membership_name': - _doing_it_wrong( __METHOD__, __( 'membership_name is deprecated. Use pmpro_getLevel() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'membership_name is deprecated. Use pmpro_getLevel() instead.', 'paid-memberships-pro' ), '3.2' ); $level = pmpro_getLevel( $this->membership_id ); return empty( $level->name ) ? '' : $level->name; case 'InitialPayment': - _doing_it_wrong( __METHOD__, __( 'InitialPayment is deprecated. Use subtotal instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'InitialPayment is deprecated. Use subtotal instead.', 'paid-memberships-pro' ), '3.2' ); return $this->subtotal; case 'PaymentAmount': - _doing_it_wrong( __METHOD__, __( 'PaymentAmount is deprecated. Get billing_amount from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'PaymentAmount is deprecated. Get billing_amount from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return empty( $level->billing_amount ) ? 0 : $level->billing_amount; case 'BillingPeriod': - _doing_it_wrong( __METHOD__, __( 'BillingPeriod is deprecated. Get cycle_period from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'BillingPeriod is deprecated. Get cycle_period from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return empty( $level->cycle_period ) ? '' : $level->cycle_period; case 'BillingFrequency': - _doing_it_wrong( __METHOD__, __( 'BillingFrequency is deprecated. Get cycle_number from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'BillingFrequency is deprecated. Get cycle_number from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return empty( $level->cycle_number ) ? 0 : $level->cycle_number; case 'TrialBillingPeriod': - _doing_it_wrong( __METHOD__, __( 'TrialBillingPeriod is deprecated. Get cycle_period from $this->getMembershipLevelAtCheckout() if the level is a trial instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'TrialBillingPeriod is deprecated. Get cycle_period from $this->getMembershipLevelAtCheckout() if the level is a trial instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return pmpro_isLevelTrial( $level ) ? $level->cycle_period : ''; case 'TrialBillingFrequency': - _doing_it_wrong( __METHOD__, __( 'TrialBillingFrequency is deprecated. Get cycle_number from $this->getMembershipLevelAtCheckout() if the level is a trial instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'TrialBillingFrequency is deprecated. Get cycle_number from $this->getMembershipLevelAtCheckout() if the level is a trial instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return pmpro_isLevelTrial( $level ) ? $level->cycle_number : 0; case 'TrialBillingCycles': - _doing_it_wrong( __METHOD__, __( 'TrialBillingCycles is deprecated. Get trial_limit from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'TrialBillingCycles is deprecated. Get trial_limit from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return $level->trial_limit; case 'TrialAmount': - _doing_it_wrong( __METHOD__, __( 'TrialAmount is deprecated. Get trial_amount from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'TrialAmount is deprecated. Get trial_amount from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return pmpro_round_price( $level->trial_amount ); case 'TotalBillingCycles': - _doing_it_wrong( __METHOD__, __( 'TotalBillingCycles is deprecated. Get billing_limit from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'TotalBillingCycles is deprecated. Get billing_limit from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); return empty( $level->billing_limit ) ? 0 : $level->billing_limit; case 'ProfileStartDate': - _doing_it_wrong( __METHOD__, __( 'ProfileStartDate is deprecated. Use the pmpro_calculate_profile_start_date() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'ProfileStartDate is deprecated. Use the pmpro_calculate_profile_start_date() instead.', 'paid-memberships-pro' ), '3.2' ); return pmpro_calculate_profile_start_date( $this, 'Y-m-d\TH:i:s' ); case 'CVV2': - _doing_it_wrong( __METHOD__, __( 'CVV2 is deprecated. Use the CVV from $_REQUEST instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'CVV2 is deprecated. Use the CVV from $_REQUEST instead.', 'paid-memberships-pro' ), '3.2' ); return empty( $_REQUEST['CVV'] ) ? '' : sanitize_text_field( $_REQUEST['CVV'] ); case 'FirstName': - _doing_it_wrong( __METHOD__, __( 'FirstName is deprecated. Use the the billing name instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'FirstName is deprecated. Use the the billing name instead.', 'paid-memberships-pro' ), '3.2' ); $nameparts = pnp_split_full_name( $this->billing->name ); return empty( $nameparts['fname'] ) ? '' : $nameparts['fname']; case 'LastName': - _doing_it_wrong( __METHOD__, __( 'LastName is deprecated. Use the the billing name instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'LastName is deprecated. Use the the billing name instead.', 'paid-memberships-pro' ), '3.2' ); $nameparts = pnp_split_full_name( $this->billing->name ); return empty( $nameparts['lname'] ) ? '' : $nameparts['lname']; case 'Address1': - _doing_it_wrong( __METHOD__, __( 'Address1 is deprecated. Use the the billing address instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'Address1 is deprecated. Use the the billing address instead.', 'paid-memberships-pro' ), '3.2' ); return empty( $this->billing->street ) ? '' : $this->billing->street; case 'Address2': - _doing_it_wrong( __METHOD__, __( 'Address2 is deprecated. Use the the billing address instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'Address2 is deprecated. Use the the billing address instead.', 'paid-memberships-pro' ), '3.2' ); return empty( $this->billing->street2 ) ? '' : $this->billing->street2; case 'Email': - _doing_it_wrong( __METHOD__, __( 'Email is deprecated. Use the the user email instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'Email is deprecated. Use the the user email instead.', 'paid-memberships-pro' ), '3.2' ); $user = get_userdata( $this->user_id ); return empty( $user->user_email ) ? '' : $user->user_email; case 'initial_amount': - _doing_it_wrong( __METHOD__, __( 'initial_amount is deprecated. Use the subtotal and then calculate the tax instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'initial_amount is deprecated. Use the subtotal and then calculate the tax instead.', 'paid-memberships-pro' ), '3.2' ); $initial_tax = $this->getTaxForPrice( $this->subtotal ); return pmpro_round_price((float)$this->subtotal + (float)$initial_tax); case 'subscription_amount': - _doing_it_wrong( __METHOD__, __( 'subscription_amount is deprecated. Use the billing_amount from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), 'TBD' ); + _doing_it_wrong( __METHOD__, __( 'subscription_amount is deprecated. Use the billing_amount from $this->getMembershipLevelAtCheckout() instead.', 'paid-memberships-pro' ), '3.2' ); $level = $this->getMembershipLevelAtCheckout(); $subscription_tax = $this->getTaxForPrice( $level->billing_amount ); return pmpro_round_price( (float)$level->billing_amount + (float)$subscription_tax ); @@ -1474,7 +1474,7 @@ function saveOrder() //only on inserts, we might want to set the expirationmonth and expirationyear from ExpirationDate/ // This will be removed in a future version. if( (empty($this->expirationmonth) || empty($this->expirationyear)) && !empty($this->ExpirationDate)) { - _doing_it_wrong( 'MemberOrder::saveOrder', 'ExpirationDate is deprecated. Use expirationmonth and expirationyear.', 'TBD' ); + _doing_it_wrong( 'MemberOrder::saveOrder', 'ExpirationDate is deprecated. Use expirationmonth and expirationyear.', '3.2' ); $this->expirationmonth = substr($this->ExpirationDate, 0, 2); $this->expirationyear = substr($this->ExpirationDate, 2, 4); } @@ -1643,11 +1643,11 @@ function process() * For offsite gateways with a confirm step. * * @since 1.8 - * @deprecated TBD + * @deprecated 3.2 */ function confirm() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); if (is_object($this->Gateway)) { return $this->Gateway->confirm($this); } @@ -1680,11 +1680,11 @@ function updateBilling() /** * Call the getSubscriptionStatus method of the gateway class. * - * @deprecated TBD + * @deprecated 3.2 */ function getGatewaySubscriptionStatus() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); if (is_object($this->Gateway)) { return $this->Gateway->getSubscriptionStatus( $this ); } @@ -1693,11 +1693,11 @@ function getGatewaySubscriptionStatus() /** * Call the getTransactionStatus method of the gateway class. * - * @deprecated TBD + * @deprecated 3.2 */ function getGatewayTransactionStatus() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); if (is_object($this->Gateway)) { return $this->Gateway->getTransactionStatus( $this ); } @@ -1706,10 +1706,10 @@ function getGatewayTransactionStatus() /** * Get TOS consent information. * @since 1.9.5 - * @deprecated TBD - Use pmpro_get_consent_log_entry_for_order() insetad. + * @deprecated 3.2 - Use pmpro_get_consent_log_entry_for_order() insetad. */ function get_tos_consent_log_entry() { - _deprecated_function( __METHOD__, 'TBD', 'pmpro_get_consent_log_entry_for_order()' ); + _deprecated_function( __METHOD__, '3.2', 'pmpro_get_consent_log_entry_for_order()' ); if ( empty( $this->id ) ) { return false; } diff --git a/classes/gateways/class.pmprogateway.php b/classes/gateways/class.pmprogateway.php index 3bcd8aeede..546a98c7e3 100644 --- a/classes/gateways/class.pmprogateway.php +++ b/classes/gateways/class.pmprogateway.php @@ -18,11 +18,11 @@ function process( &$order ) { } /** - * @deprecated TBD + * @deprecated 3.2 */ function authorize(&$order) { - _deprecated_function( __METHOD__, 'TBD' ); + _deprecated_function( __METHOD__, '3.2' ); //create a code for the order if(empty($order->code)) @@ -35,11 +35,11 @@ function authorize(&$order) } /** - * @deprecated TBD + * @deprecated 3.2 */ function void(&$order) { - _deprecated_function( __METHOD__, 'TBD' ); + _deprecated_function( __METHOD__, '3.2' ); //need a transaction id if(empty($order->payment_transaction_id)) @@ -52,11 +52,11 @@ function void(&$order) } /** - * @deprecated TBD + * @deprecated 3.2 */ function charge(&$order) { - _deprecated_function( __METHOD__, 'TBD' ); + _deprecated_function( __METHOD__, '3.2' ); //create a code for the order if(empty($order->code)) @@ -69,11 +69,11 @@ function charge(&$order) } /** - * @deprecated TBD + * @deprecated 3.2 */ function subscribe(&$order) { - _deprecated_function( __METHOD__, 'TBD' ); + _deprecated_function( __METHOD__, '3.2' ); //create a code for the order if(empty($order->code)) @@ -102,7 +102,7 @@ function update( &$order ) { /** * Cancel the subscription associated with the passed order. * - * @deprecated TBD Use cancel_subscription insetad. + * @deprecated 3.2 Use cancel_subscription insetad. * * @param MemberOrder $order The order object associated with the subscription to cancel. * @return bool True if the subscription was canceled successfully, false otherwise. @@ -126,11 +126,11 @@ function cancel_subscription( $subscription ) { } /** - * @deprecated TBD + * @deprecated 3.2 */ function getSubscriptionStatus(&$order) { - _deprecated_function( __METHOD__, 'TBD' ); + _deprecated_function( __METHOD__, '3.2' ); //require a subscription id if(empty($order->subscription_transaction_id)) return false; @@ -140,11 +140,11 @@ function getSubscriptionStatus(&$order) } /** - * @deprecated TBD + * @deprecated 3.2 */ function getTransactionStatus(&$order) { - _deprecated_function( __METHOD__, 'TBD' ); + _deprecated_function( __METHOD__, '3.2' ); //this looks different for each gateway, but generally an array of some sort return array(); } diff --git a/classes/gateways/class.pmprogateway_authorizenet.php b/classes/gateways/class.pmprogateway_authorizenet.php index ea8fd53208..ac199fca74 100644 --- a/classes/gateways/class.pmprogateway_authorizenet.php +++ b/classes/gateways/class.pmprogateway_authorizenet.php @@ -29,10 +29,10 @@ static function init() } /** - * @deprecated TBD + * @deprecated 3.2 */ static function pmpro_checkout_order( $morder ) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); return $morder; } diff --git a/classes/gateways/class.pmprogateway_paypalexpress.php b/classes/gateways/class.pmprogateway_paypalexpress.php index f703621e26..b9b6d8f2c3 100644 --- a/classes/gateways/class.pmprogateway_paypalexpress.php +++ b/classes/gateways/class.pmprogateway_paypalexpress.php @@ -259,11 +259,11 @@ static function pmpro_checkout_preheader() { return; } - // Set some globals for compatibility with pre-TBD checkout page templates. + // Set some globals for compatibility with pre-3.2 checkout page templates. global $pmpro_paypal_token; $pmpro_paypal_token = $pmpro_review->paypal_token; - // For backwards compatibility with pre-TBD checkout page templates, also check if the $_REQUEST['confirm'] attribute is set. + // For backwards compatibility with pre-3.2 checkout page templates, also check if the $_REQUEST['confirm'] attribute is set. // If so, we want to process the chekcout form submission. if ( ! empty( $_REQUEST['confirm'] ) ) { // Process the checkout form submission. @@ -317,11 +317,11 @@ static function pmpro_checkout_before_processing() { * Review and Confirmation code. * * @since 1.8 - * @deprecated TBD + * @deprecated 3.2 */ static function pmpro_checkout_confirmed($pmpro_confirmed) { - _deprecated_function( __FUNCTION__, 'TBD', 'PMProGateway_paypalexpress::process()' ); + _deprecated_function( __FUNCTION__, '3.2', 'PMProGateway_paypalexpress::process()' ); global $pmpro_msg, $pmpro_msgt, $pmpro_level, $current_user, $pmpro_review, $pmpro_paypal_token, $discount_code, $bemail; //PayPal Express Call Backs @@ -420,11 +420,11 @@ static function pmpro_checkout_confirmed($pmpro_confirmed) * Swap in user/pass/etc from session * * @since 1.8 - * @deprecated TBD + * @deprecated 3.2 */ static function pmpro_checkout_new_user_array($new_user_array) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); global $current_user; if(!$current_user->ID) @@ -453,7 +453,7 @@ static function pmpro_checkout_new_user_array($new_user_array) * Process at checkout * * @since 2.0 - The old process() method is now confirm(). - * @since TBD - This method now handles both sending users to PayPal and confirming checkouts. + * @since 3.2 - This method now handles both sending users to PayPal and confirming checkouts. */ function process( &$order ) { // If the user has not yet been sent to PayPal, send them to pay. @@ -515,11 +515,11 @@ function process( &$order ) { * Process charge or subscription after confirmation. * * @since 1.8 - * @deprecated TBD + * @deprecated 3.2 */ function confirm(&$order) { - _deprecated_function( __FUNCTION__, 'TBD', 'PMProGateway_paypalexpress::process()' ); + _deprecated_function( __FUNCTION__, '3.2', 'PMProGateway_paypalexpress::process()' ); if(pmpro_isLevelRecurring($order->membership_level)) { return $this->subscribe($order); diff --git a/classes/gateways/class.pmprogateway_stripe.php b/classes/gateways/class.pmprogateway_stripe.php index be888755cf..dabe2e1d5d 100644 --- a/classes/gateways/class.pmprogateway_stripe.php +++ b/classes/gateways/class.pmprogateway_stripe.php @@ -1506,7 +1506,7 @@ static function show_stripe_checkout_pending_warning($show) * Send user to Stripe to pay. * * @since 2.8 - Hooked into pmpro_checkout_before_change_membership_level - * @since TBD - Now called by the gateway's process() method. + * @since 3.2 - Now called by the gateway's process() method. * * @param int $user_id ID of user who is checking out. * @param MemberOrder $morder MemberOrder object for this checkout. diff --git a/includes/cloudflare-turnstile.php b/includes/cloudflare-turnstile.php index 5cc5a2c4a9..c441eb366e 100644 --- a/includes/cloudflare-turnstile.php +++ b/includes/cloudflare-turnstile.php @@ -137,7 +137,7 @@ function pmpro_cloudflare_turnstile_settings() { /** * Save CloudFlare Turnstile settings on the PMPro settings page. * - * @since TBD + * @since 3.2 */ function pmpro_cloudflare_turnstile_settings_save() { pmpro_setOption( 'cloudflare_turnstile', intval( $_POST['cloudflare_turnstile'] ) ); @@ -149,7 +149,7 @@ function pmpro_cloudflare_turnstile_settings_save() { /** * Get human readable error messages for CloudFlare response. * - * @since TBD + * @since 3.2 */ function pmpro_cloudflare_turnstile_get_error_message() { $error_messages = array( diff --git a/includes/deprecated.php b/includes/deprecated.php index 95bdebfbea..ac6d2037f1 100644 --- a/includes/deprecated.php +++ b/includes/deprecated.php @@ -749,7 +749,7 @@ function pmpro_recurring_emails_deprecated() { // pmpror_recurring_emails function. if ( ! function_exists( 'pmpror_recurring_emails' ) ) { function pmpror_recurring_emails() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); pmpro_cron_recurring_payment_reminders(); } } @@ -757,7 +757,7 @@ function pmpror_recurring_emails() { // pmpror_template_callback function. if ( ! function_exists( 'pmpror_template_callback' ) ) { function pmpror_template_callback( $buffer ) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); return $buffer; } } @@ -765,21 +765,21 @@ function pmpror_template_callback( $buffer ) { // pmpror_load_plugin_text_domain function. if ( ! function_exists( 'pmpror_load_plugin_text_domain' ) ) { function pmpror_load_plugin_text_domain() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); } } // pmpror_init_test function. if ( ! function_exists( 'pmpror_init_test' ) ) { function pmpror_init_test() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); } } // pmpror_recurring_emails_legacy function. if ( ! function_exists( 'pmpror_recurring_emails_legacy' ) ) { function pmpror_recurring_emails_legacy() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); pmpro_cron_recurring_payment_reminders(); } } @@ -787,21 +787,21 @@ function pmpror_recurring_emails_legacy() { // pmpror_log function. if ( ! function_exists( 'pmpror_log' ) ) { function pmpror_log( $message ) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); } } // pmpror_output_log function. if ( ! function_exists( 'pmpror_output_log' ) ) { function pmpror_output_log() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); } } // pmpro_recurring_emails_plugin_row_meta function. if ( ! function_exists( 'pmpro_recurring_emails_plugin_row_meta' ) ) { function pmpro_recurring_emails_plugin_row_meta( $links, $file ) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); return $links; } } diff --git a/includes/filters.php b/includes/filters.php index 956726234c..2933a25fe6 100644 --- a/includes/filters.php +++ b/includes/filters.php @@ -182,10 +182,10 @@ function pmpro_pmpro_level_description( $description ) { This function is being deprecated as ProfileStartDate is no longer stored as an order property. This is now coded directly into the PayPal Express subscribe() function. - @deprecated TBD + @deprecated 3.2 */ function pmpro_pmpro_subscribe_order_startdate_limit( $order, $gateway ) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); return $order; } diff --git a/includes/functions.php b/includes/functions.php index faccf63e99..51a7530369 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -3984,11 +3984,11 @@ function pmpro_was_checkout_form_submitted() { /** * Build the order object used at checkout. * @since 2.1 - * @deprecated TBD + * @deprecated 3.2 * @return mixed $order Order object. */ function pmpro_build_order_for_checkout() { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); global $gateway, $pmpro_level, $current_user, $bfirstname, $blastname, $baddress1, $baddress2, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail, $CardType, $AccountNumber, $ExpirationMonth, $ExpirationYear, $CVV; diff --git a/includes/recaptcha.php b/includes/recaptcha.php index 2eeea72835..5461d218c2 100644 --- a/includes/recaptcha.php +++ b/includes/recaptcha.php @@ -116,7 +116,7 @@ function pmpro_recaptcha_get_html() { // If we are on the checkout page, run the deprecated pmpro_checkout_after_captcha action. if ( pmpro_is_checkout() ) { - do_action_deprecated( 'pmpro_checkout_after_captcha', array(), 'TBD', 'pmpro_checkout_before_submit_button' ); + do_action_deprecated( 'pmpro_checkout_after_captcha', array(), '3.2', 'pmpro_checkout_before_submit_button' ); } $already_shown = true; @@ -207,7 +207,7 @@ function pmpro_recaptcha_is_validated() { /** * Stop form submission if ReCAPTCHA is not validated. * - * @since TBD + * @since 3.2 * * @param bool $continue Whether to continue with form submission. */ @@ -238,7 +238,7 @@ function pmpro_recaptcha_validation_check( $continue = true ) { /** * Show reCAPTCHA settings on the PMPro settings page. * - * @since TBD + * @since 3.2 */ function pmpro_recaptcha_settings() { // Get the current options. @@ -305,7 +305,7 @@ function pmpro_recaptcha_settings() { /** * Save reCAPTCHA settings on the PMPro settings page. * - * @since TBD + * @since 3.2 */ function pmpro_recaptcha_settings_save() { pmpro_setOption( "recaptcha", intval( $_POST['recaptcha'] ) ); diff --git a/includes/terms-of-service.php b/includes/terms-of-service.php index 1f8fdd369a..f8144f446c 100644 --- a/includes/terms-of-service.php +++ b/includes/terms-of-service.php @@ -2,7 +2,7 @@ /** * Add TOS field to advanced settings. * - * @since TBD + * @since 3.2 * * @param array $settings The array of settings. * @return array The array of settings with the TOS field added. @@ -22,7 +22,7 @@ function pmpro_add_tos_field_to_advanced_settings( $settings ) { /** * Callback function to display the TOS field on the advanced settings page. * - * @since TBD + * @since 3.2 */ function pmpro_tos_advanced_settings_callback() { $tospage = get_option( 'pmpro_tospage' ); @@ -38,7 +38,7 @@ function pmpro_tos_advanced_settings_callback() { /** * Add a TOS consent checkbox to the checkout page. * - * @since TBD + * @since 3.2 */ function pmpro_show_tos_at_checkout() { global $pmpro_review; @@ -48,7 +48,7 @@ function pmpro_show_tos_at_checkout() { // If checkout is being reviewed, don't show the TOS checkbox. if ( $pmpro_review ) { - do_action_deprecated( 'pmpro_checkout_after_tos_fields', array(), 'TBD' ); + do_action_deprecated( 'pmpro_checkout_after_tos_fields', array(), '3.2' ); return; } @@ -58,7 +58,7 @@ function pmpro_show_tos_at_checkout() { $tospage = get_post( $tospage ); } if ( empty( $tospage ) ) { - do_action_deprecated( 'pmpro_checkout_after_tos_fields', array(), 'TBD' ); + do_action_deprecated( 'pmpro_checkout_after_tos_fields', array(), '3.2' ); return; } @@ -99,25 +99,25 @@ function pmpro_show_tos_at_checkout() { * * @since 2.8 */ - do_action_deprecated( 'pmpro_checkout_after_tos', array(), 'TBD' ); + do_action_deprecated( 'pmpro_checkout_after_tos', array(), '3.2' ); ?> $callback. */ @@ -378,7 +378,7 @@ function pmpro_add_tos_consent_log_entry_to_order_csv_export( $extra_columns ) { /** * Callback function to get the TOS consent log entry post ID for the order CSV export. * - * @since TBD + * @since 3.2 * * @param MemberOrder $order The order object. */ @@ -393,7 +393,7 @@ function pmpro_get_tos_consent_log_entry_post_id_for_order_csv_export( $order ) /** * Callback function to get the TOS consent log entry post modified date for the order CSV export. * - * @since TBD + * @since 3.2 * * @param MemberOrder $order The order object. */ diff --git a/package.json b/package.json index 8404d65ea7..f700d9128c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paid-memberships-pro", - "version": "3.1.4", + "version": "3.1.99", "description": "WordPress Membership Plugin", "directories": { "test": "tests" diff --git a/pages/checkout.php b/pages/checkout.php index fb0ad24ed2..81a99713f8 100644 --- a/pages/checkout.php +++ b/pages/checkout.php @@ -1,12 +1,12 @@ user_email : null ) ), 'TBD' ); + $oldem_user = apply_filters_deprecated( "pmpro_checkout_oldemail", array( ( false !== $oldem_user ? $oldem_user->user_email : null ) ), '3.2' ); if ( ! empty( $oldem_user ) ) { pmpro_setMessage( __( "That email address is already in use. Please log in, or use a different email address.", 'paid-memberships-pro' ), "pmpro_error" ); $pmpro_error_fields[] = "bemail"; @@ -471,7 +471,7 @@ ) ); - $user_id = apply_filters_deprecated( 'pmpro_new_user', array( '', $new_user_array ), 'TBD' ); + $user_id = apply_filters_deprecated( 'pmpro_new_user', array( '', $new_user_array ), '3.2' ); if ( empty( $user_id ) ) { $user_id = wp_insert_user( $new_user_array ); } @@ -634,7 +634,7 @@ // make sure we have at least an empty order here to avoid a warning $pmpro_review = false; } -$pmpro_confirmed_data = apply_filters_deprecated( 'pmpro_checkout_confirmed', array( $pmpro_confirmed, $pmpro_review ), 'TBD' ); +$pmpro_confirmed_data = apply_filters_deprecated( 'pmpro_checkout_confirmed', array( $pmpro_confirmed, $pmpro_review ), '3.2' ); if ( is_array( $pmpro_confirmed_data ) ) { extract( $pmpro_confirmed_data ); diff --git a/readme.txt b/readme.txt index 8ed785e986..47b720ec34 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: memberships, member, community, user profile, user registration Requires at least: 5.2 Tested up to: 6.6 Requires PHP: 5.6 -Stable tag: 3.1.4 +Stable tag: 3.1.99 License: GPLv2 License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -216,7 +216,7 @@ Not sure? You can find out by doing a bit a research. 10. Advanced settings for updating non-member messages, optionally show excerpts or filter content, use reCAPTCHA, and a Terms of Service checkbox. == Changelog == -= 3.2 - TBD = += 3.2 RC1 - 09-26-2024 = * FEATURE: Users will now receive a notification email when they have an upcoming subscription payment. #3109 (@dparker1005) * FEATURE: Added integration with Cloudflare Turnstile. #3123 (@andrewlimaza) * ENHANCEMENT: The business address for the website can now be set on the Advanced Settings page and will be shown on invoices. #3134 (@MaximilianoRicoTabo) @@ -228,6 +228,7 @@ Not sure? You can find out by doing a bit a research. * ENHANCEMENT: Now creating a user at checkout even when order creation checks fail. #3137 (@dparker1005) * ENHANCEMENT: Memberships on the Membership Account page will now be shown in the order set on the Membership Levels settings page. #3112 (@kimcoleman) * BUG FIX/ENHANCEMENT: Street2 billing address lines are now stored separately in the MemberOrder object. #3122 (@dparker1005) +* BUG FIX: Fixed an issue where payment fields on the update billing page might be wrapped in nested cards. #3143 (@kimcoleman) * REFACTOR: Abstracted all "Terms of Service" logic into a single file. #3119 (@dparker1005) * REFACTOR: Abstracted all reCAPTCHA logic into a single file. #3105 (@dparker1005) * REFACTOR: Cleaned up the checkout preheader flow including deprecating the `pmpro_build_order_for_checkout()` function in favor of inline logic. #3129 (@dparker1005) diff --git a/scheduled/crons.php b/scheduled/crons.php index 8eb2936dbd..ff3720787f 100644 --- a/scheduled/crons.php +++ b/scheduled/crons.php @@ -322,7 +322,7 @@ function pmpro_cron_recurring_payment_reminders() { /** * Filter whether to send a recurring payment reminder email. * - * @since TBD + * @since 3.2 * * @param bool $send_email Whether to send the email. Default is true. * @param PMPro_Subscription $subscription_obj The subscription object. @@ -333,13 +333,13 @@ function pmpro_cron_recurring_payment_reminders() { /** * @filter pmprorm_send_reminder_to_user * - * @deprecated TBD + * @deprecated 3.2 * * @param boolean $send_mail - Whether to send mail or not (true by default) * @param WP_User $user - User object being processed * @param MembershipOrder $lastorder - Deprecated. Now passing null. */ - $send_emails = apply_filters_deprecated( 'pmprorm_send_reminder_to_user', array( $send_email, $user, null ), 'TBD' ); + $send_emails = apply_filters_deprecated( 'pmprorm_send_reminder_to_user', array( $send_email, $user, null ), '3.2' ); if ( $send_emails ) { // Get the level info. diff --git a/services/braintree-webhook.php b/services/braintree-webhook.php index c699bfe2d7..64d81c5304 100644 --- a/services/braintree-webhook.php +++ b/services/braintree-webhook.php @@ -410,7 +410,7 @@ /** * Fix address info for order/transaction * - * @deprecated TBD + * @deprecated 3.2 * * @param int $user_id * @param \MemberOrder $old_order @@ -418,7 +418,7 @@ * @return \stdClass */ function pmpro_braintreeAddressInfo( $user_id, $old_order ) { - _deprecated_function( __FUNCTION__, 'TBD' ); + _deprecated_function( __FUNCTION__, '3.2' ); // Grab billing info from the saved metadata as needed