Payment Plugins for Stripe WooCommerce - Version 3.3.31

Version Description

  • 10/19/22 =
  • Fixed - Potential PHP error caused by PHP 8.1+ in Blocks class GooglePayPayment
  • Fixed - Incorrect text domain for installment text
Download this release

Release Info

Developer mr.clayton
Plugin Icon wp plugin Payment Plugins for Stripe WooCommerce
Version 3.3.31
Comparing to
See all releases

Code changes from version 3.3.30 to 3.3.31

i18n/languages/woo-stripe-payment.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Payment Plugins for Stripe WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Payment Plugins for Stripe WooCommerce 3.3.30\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-10-18T22:07:04+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: woo-stripe-payment\n"
@@ -129,7 +129,7 @@ msgstr ""
129
  #: includes/controllers/class-wc-stripe-controller-cart.php:192
130
  #: includes/controllers/class-wc-stripe-controller-googlepay.php:136
131
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:109
132
- #: packages/blocks/src/Payments/AbstractStripePayment.php:83
133
  #: packages/blocks/src/Payments/Gateways/GooglePayPayment.php:28
134
  msgid "Total"
135
  msgstr ""
@@ -2586,6 +2586,10 @@ msgstr ""
2586
  msgid "Do not pay with installment."
2587
  msgstr ""
2588
 
 
 
 
 
2589
  #: src/Installments/InstallmentFormatter.php:46
2590
  msgid "day"
2591
  msgid_plural "days"
2
  # This file is distributed under the same license as the Payment Plugins for Stripe WooCommerce plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Payment Plugins for Stripe WooCommerce 3.3.31\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-stripe-payment\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-10-19T07:52:50+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: woo-stripe-payment\n"
129
  #: includes/controllers/class-wc-stripe-controller-cart.php:192
130
  #: includes/controllers/class-wc-stripe-controller-googlepay.php:136
131
  #: includes/gateways/class-wc-payment-gateway-stripe-googlepay.php:109
132
+ #: packages/blocks/src/Payments/AbstractStripePayment.php:79
133
  #: packages/blocks/src/Payments/Gateways/GooglePayPayment.php:28
134
  msgid "Total"
135
  msgstr ""
2586
  msgid "Do not pay with installment."
2587
  msgstr ""
2588
 
2589
+ #: src/Installments/InstallmentFormatter.php:39
2590
+ msgid "%1$s / %2$s for %3$s"
2591
+ msgstr ""
2592
+
2593
  #: src/Installments/InstallmentFormatter.php:46
2594
  msgid "day"
2595
  msgid_plural "days"
includes/class-stripe.php CHANGED
@@ -26,7 +26,7 @@ class WC_Stripe_Manager {
26
  *
27
  * @var string
28
  */
29
- public $version = '3.3.30';
30
 
31
  /**
32
  *
26
  *
27
  * @var string
28
  */
29
+ public $version = '3.3.31';
30
 
31
  /**
32
  *
packages/blocks/src/Payments/AbstractStripeLocalPayment.php CHANGED
@@ -11,7 +11,7 @@ namespace PaymentPlugins\Blocks\Stripe\Payments;
11
  abstract class AbstractStripeLocalPayment extends AbstractStripePayment {
12
 
13
  public function get_payment_method_script_handles() {
14
- if ( ! wp_script_is( 'wc-stripe-local-payment', 'registered' ) && ! is_checkout() ) {
15
  $this->assets_api->register_script( 'wc-stripe-block-local-payment', 'build/wc-stripe-local-payment.js' );
16
  }
17
 
11
  abstract class AbstractStripeLocalPayment extends AbstractStripePayment {
12
 
13
  public function get_payment_method_script_handles() {
14
+ if ( ! wp_script_is( 'wc-stripe-block-local-payment', 'registered' ) && ! is_checkout() ) {
15
  $this->assets_api->register_script( 'wc-stripe-block-local-payment', 'build/wc-stripe-local-payment.js' );
16
  }
17
 
packages/blocks/src/Payments/AbstractStripePayment.php CHANGED
@@ -12,14 +12,12 @@ use \PaymentPlugins\Blocks\Stripe\Assets\Api as AssetsApi;
12
  */
13
  abstract class AbstractStripePayment extends AbstractPaymentMethodType {
14
 
 
 
15
  /**
16
- * The Payment Method that is wrapped by this class.
17
- *
18
  * @var \WC_Payment_Gateway_Stripe
19
  */
20
- //protected $payment_method;
21
-
22
- protected $assets_api;
23
 
24
  public function __construct( AssetsApi $assets_api ) {
25
  $this->assets_api = $assets_api;
@@ -34,23 +32,21 @@ abstract class AbstractStripePayment extends AbstractPaymentMethodType {
34
  }
35
 
36
  protected function payment_method() {
37
- static $payment_method;
38
-
39
- if ( ! $payment_method ) {
40
  $payment_methods = WC()->payment_gateways()->payment_gateways();
41
 
42
- $payment_method = isset( $payment_methods[ $this->get_name() ] ) ? $payment_methods[ $this->get_name() ] : null;
43
  /**
44
  * It's possible that some 3rd party code has unset the payment gateway using the
45
  * woocommerce_payment_gateways filter. To prevent null exceptions, ensure this variable
46
  * is never null
47
  */
48
- if ( ! $payment_method ) {
49
- $payment_method = new MagicPaymentMethod( $this->get_name() );
50
  }
51
  }
52
 
53
- return $payment_method;
54
  }
55
 
56
  protected function init() {
12
  */
13
  abstract class AbstractStripePayment extends AbstractPaymentMethodType {
14
 
15
+ protected $assets_api;
16
+
17
  /**
 
 
18
  * @var \WC_Payment_Gateway_Stripe
19
  */
20
+ protected $payment_gateway;
 
 
21
 
22
  public function __construct( AssetsApi $assets_api ) {
23
  $this->assets_api = $assets_api;
32
  }
33
 
34
  protected function payment_method() {
35
+ if ( ! $this->payment_gateway ) {
 
 
36
  $payment_methods = WC()->payment_gateways()->payment_gateways();
37
 
38
+ $this->payment_gateway = isset( $payment_methods[ $this->get_name() ] ) ? $payment_methods[ $this->get_name() ] : null;
39
  /**
40
  * It's possible that some 3rd party code has unset the payment gateway using the
41
  * woocommerce_payment_gateways filter. To prevent null exceptions, ensure this variable
42
  * is never null
43
  */
44
+ if ( ! $this->payment_gateway ) {
45
+ $this->payment_gateway = new MagicPaymentMethod( $this->get_name() );
46
  }
47
  }
48
 
49
+ return $this->payment_gateway;
50
  }
51
 
52
  protected function init() {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: stripe, ach, klarna, credit card, apple pay, google pay, ideal, sepa, sofo
4
  Requires at least: 3.0.1
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
- Stable tag: 3.3.30
8
  Copyright: Payment Plugins
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -62,7 +62,10 @@ If you're site is not loading over https, then Stripe won't render the Payment R
62
  9. Stripe Link for high conversion
63
 
64
  == Changelog ==
65
- = 3.3.30 =
 
 
 
66
  * Updated - WC tested up to 7.0
67
  * Updated - Improved integration with FunnelKit (WooFunnels One Click Upsell)
68
  * Added - Support for WooCommerce custom order tables (HPOS)
4
  Requires at least: 3.0.1
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
+ Stable tag: 3.3.31
8
  Copyright: Payment Plugins
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
62
  9. Stripe Link for high conversion
63
 
64
  == Changelog ==
65
+ = 3.3.31 - 10/19/22 =
66
+ * Fixed - Potential PHP error caused by PHP 8.1+ in Blocks class GooglePayPayment
67
+ * Fixed - Incorrect text domain for installment text
68
+ = 3.3.30 - 10/18/22 =
69
  * Updated - WC tested up to 7.0
70
  * Updated - Improved integration with FunnelKit (WooFunnels One Click Upsell)
71
  * Added - Support for WooCommerce custom order tables (HPOS)
src/Installments/InstallmentFormatter.php CHANGED
@@ -36,7 +36,7 @@ class InstallmentFormatter {
36
 
37
  public function format_plan( $plan, $amount, $currency ) {
38
  $amount = wc_stripe_remove_number_precision( $amount / (float) $plan->count, $currency );
39
- $text = sprintf( __( '%1$s / %2$s for %3$s', 'woo-stripe-payments' ), $this->format_price( $amount, [ 'currency' => $currency ] ), $this->get_formatted_interval( $plan->interval ), $this->get_formatted_duration( $plan->interval, $plan->count ) );
40
 
41
  return apply_filters( 'wc_stripe_installment_format_plan', $text, compact( 'plan', 'amount', 'currency' ), $this );
42
  }
36
 
37
  public function format_plan( $plan, $amount, $currency ) {
38
  $amount = wc_stripe_remove_number_precision( $amount / (float) $plan->count, $currency );
39
+ $text = sprintf( __( '%1$s / %2$s for %3$s', 'woo-stripe-payment' ), $this->format_price( $amount, [ 'currency' => $currency ] ), $this->get_formatted_interval( $plan->interval ), $this->get_formatted_duration( $plan->interval, $plan->count ) );
40
 
41
  return apply_filters( 'wc_stripe_installment_format_plan', $text, compact( 'plan', 'amount', 'currency' ), $this );
42
  }
stripe-payments.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Payment Plugins for Stripe WooCommerce
5
  * Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
6
  * Description: Accept Credit Cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
7
- * Version: 3.3.30
8
  * Author: Payment Plugins, support@paymentplugins.com
9
  * Text Domain: woo-stripe-payment
10
  * Domain Path: /i18n/languages/
4
  * Plugin Name: Payment Plugins for Stripe WooCommerce
5
  * Plugin URI: https://docs.paymentplugins.com/wc-stripe/config/
6
  * Description: Accept Credit Cards, Google Pay, Apple Pay, ACH, Klarna and more using Stripe.
7
+ * Version: 3.3.31
8
  * Author: Payment Plugins, support@paymentplugins.com
9
  * Text Domain: woo-stripe-payment
10
  * Domain Path: /i18n/languages/
vendor/composer/installed.php CHANGED
@@ -3,7 +3,7 @@
3
  'name' => '__root__',
4
  'pretty_version' => 'dev-master',
5
  'version' => 'dev-master',
6
- 'reference' => '222939843f684c8b59abc16d8e53a07c98d9d6fb',
7
  'type' => 'library',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
  '__root__' => array(
14
  'pretty_version' => 'dev-master',
15
  'version' => 'dev-master',
16
- 'reference' => '222939843f684c8b59abc16d8e53a07c98d9d6fb',
17
  'type' => 'library',
18
  'install_path' => __DIR__ . '/../../',
19
  'aliases' => array(),
3
  'name' => '__root__',
4
  'pretty_version' => 'dev-master',
5
  'version' => 'dev-master',
6
+ 'reference' => 'e771024f413d9b03e0e61d42bc4147b38036f710',
7
  'type' => 'library',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
13
  '__root__' => array(
14
  'pretty_version' => 'dev-master',
15
  'version' => 'dev-master',
16
+ 'reference' => 'e771024f413d9b03e0e61d42bc4147b38036f710',
17
  'type' => 'library',
18
  'install_path' => __DIR__ . '/../../',
19
  'aliases' => array(),