Version Description
- THURSDAY, 20TH JANUARY 2022 =
- Fix: Add payment method was not working.
Download this release
Release Info
Developer | brainstormworg |
Plugin | Stripe Payments For WooCommerce by Checkout Plugins |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
- assets/js/stripe-elements.js +1 -1
- checkout-plugins-stripe-woo.php +2 -2
- gateway/stripe/card-payments.php +4 -3
- gateway/stripe/stripe-api.php +7 -0
- inc/logger.php +1 -1
- inc/traits/subscriptions.php +1 -1
- readme.txt +14 -1
assets/js/stripe-elements.js
CHANGED
@@ -299,7 +299,7 @@
|
|
299 |
}
|
300 |
return selectedGateway = selectedPaymentMethod;
|
301 |
} else if ( 0 < $( '#payment_method_cpsw_stripe' ).length && $( '#payment_method_cpsw_stripe' ).is( ':checked' ) && 'cpsw_stripe' === $( '#payment_method_cpsw_stripe' ).val() ) {
|
302 |
-
return
|
303 |
}
|
304 |
return false;
|
305 |
}
|
299 |
}
|
300 |
return selectedGateway = selectedPaymentMethod;
|
301 |
} else if ( 0 < $( '#payment_method_cpsw_stripe' ).length && $( '#payment_method_cpsw_stripe' ).is( ':checked' ) && 'cpsw_stripe' === $( '#payment_method_cpsw_stripe' ).val() ) {
|
302 |
+
return selectedGateway = 'cpsw_stripe';
|
303 |
}
|
304 |
return false;
|
305 |
}
|
checkout-plugins-stripe-woo.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Checkout Plugins - Stripe for WooCommerce
|
4 |
* Plugin URI: https://www.checkoutplugins.com/
|
5 |
* Description: Stripe for WooCommerce delivers a simple, secure way to accept credit card payments in your WooCommerce store. Reduce payment friction and boost conversions using this free plugin!
|
6 |
-
* Version: 1.2.
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://brainstormforce.com/
|
9 |
* License: GPLv2 or later
|
@@ -20,6 +20,6 @@ define( 'CPSW_FILE', __FILE__ );
|
|
20 |
define( 'CPSW_BASE', plugin_basename( CPSW_FILE ) );
|
21 |
define( 'CPSW_DIR', plugin_dir_path( CPSW_FILE ) );
|
22 |
define( 'CPSW_URL', plugins_url( '/', CPSW_FILE ) );
|
23 |
-
define( 'CPSW_VERSION', '1.2.
|
24 |
|
25 |
require_once 'autoloader.php';
|
3 |
* Plugin Name: Checkout Plugins - Stripe for WooCommerce
|
4 |
* Plugin URI: https://www.checkoutplugins.com/
|
5 |
* Description: Stripe for WooCommerce delivers a simple, secure way to accept credit card payments in your WooCommerce store. Reduce payment friction and boost conversions using this free plugin!
|
6 |
+
* Version: 1.2.1
|
7 |
* Author: Brainstorm Force
|
8 |
* Author URI: https://brainstormforce.com/
|
9 |
* License: GPLv2 or later
|
20 |
define( 'CPSW_BASE', plugin_basename( CPSW_FILE ) );
|
21 |
define( 'CPSW_DIR', plugin_dir_path( CPSW_FILE ) );
|
22 |
define( 'CPSW_URL', plugins_url( '/', CPSW_FILE ) );
|
23 |
+
define( 'CPSW_VERSION', '1.2.1' );
|
24 |
|
25 |
require_once 'autoloader.php';
|
gateway/stripe/card-payments.php
CHANGED
@@ -389,7 +389,7 @@ $ */
|
|
389 |
if ( empty( $_POST['payment_method_created'] ) && empty( $_POST['stripe_token'] ) || ! is_user_logged_in() ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
390 |
$error_msg = __( 'There was a problem adding the payment method.', 'checkout-plugins-stripe-woo' );
|
391 |
/* translators: error msg */
|
392 |
-
Logger::error( sprintf( __( 'Add payment method Error: $
|
393 |
return;
|
394 |
}
|
395 |
|
@@ -405,7 +405,7 @@ $ */
|
|
405 |
$error_msg = __( 'Invalid stripe source', 'checkout-plugins-stripe-woo' );
|
406 |
wc_add_notice( $error_msg, 'error' );
|
407 |
/* translators: error msg */
|
408 |
-
Logger::error( sprintf( __( 'Add payment method Error: $
|
409 |
return;
|
410 |
}
|
411 |
|
@@ -422,12 +422,13 @@ $ */
|
|
422 |
$error_msg = __( 'Unble to attach payment method to customer', 'checkout-plugins-stripe-woo' );
|
423 |
wc_add_notice( $error_msg, 'error' );
|
424 |
/* translators: error msg */
|
425 |
-
Logger::error( sprintf( __( 'Add payment method Error: $
|
426 |
return;
|
427 |
}
|
428 |
|
429 |
do_action( 'cpsw_add_payment_method_' . ( isset( $_POST['payment_method'] ) ? wc_clean( wp_unslash( $_POST['payment_method'] ) ) : '' ) . '_success', $source_id, $source_object ); //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
430 |
|
|
|
431 |
return [
|
432 |
'result' => 'success',
|
433 |
'redirect' => wc_get_endpoint_url( 'payment-methods' ),
|
389 |
if ( empty( $_POST['payment_method_created'] ) && empty( $_POST['stripe_token'] ) || ! is_user_logged_in() ) { //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
390 |
$error_msg = __( 'There was a problem adding the payment method.', 'checkout-plugins-stripe-woo' );
|
391 |
/* translators: error msg */
|
392 |
+
Logger::error( sprintf( __( 'Add payment method Error: %1$1s', 'checkout-plugins-stripe-woo' ), $error_msg ) );
|
393 |
return;
|
394 |
}
|
395 |
|
405 |
$error_msg = __( 'Invalid stripe source', 'checkout-plugins-stripe-woo' );
|
406 |
wc_add_notice( $error_msg, 'error' );
|
407 |
/* translators: error msg */
|
408 |
+
Logger::error( sprintf( __( 'Add payment method Error: %1$1s', 'checkout-plugins-stripe-woo' ), $error_msg ) );
|
409 |
return;
|
410 |
}
|
411 |
|
422 |
$error_msg = __( 'Unble to attach payment method to customer', 'checkout-plugins-stripe-woo' );
|
423 |
wc_add_notice( $error_msg, 'error' );
|
424 |
/* translators: error msg */
|
425 |
+
Logger::error( sprintf( __( 'Add payment method Error: %1$1s', 'checkout-plugins-stripe-woo' ), $error_msg ) );
|
426 |
return;
|
427 |
}
|
428 |
|
429 |
do_action( 'cpsw_add_payment_method_' . ( isset( $_POST['payment_method'] ) ? wc_clean( wp_unslash( $_POST['payment_method'] ) ) : '' ) . '_success', $source_id, $source_object ); //phpcs:ignore WordPress.Security.NonceVerification.Missing
|
430 |
|
431 |
+
Logger::info( __( 'New payment method added successfully', 'checkout-plugins-stripe-woo' ) );
|
432 |
return [
|
433 |
'result' => 'success',
|
434 |
'redirect' => wc_get_endpoint_url( 'payment-methods' ),
|
gateway/stripe/stripe-api.php
CHANGED
@@ -37,6 +37,13 @@ class Stripe_Api {
|
|
37 |
'stripe_version' => '2020-08-27',
|
38 |
]
|
39 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
}
|
42 |
|
37 |
'stripe_version' => '2020-08-27',
|
38 |
]
|
39 |
);
|
40 |
+
|
41 |
+
\Stripe\Stripe::setAppInfo(
|
42 |
+
'WordPress Checkout Plugins - Stripe for WooCommerce',
|
43 |
+
CPSW_VERSION,
|
44 |
+
'https://wordpress.org/plugins/checkout-plugins-stripe-woo/',
|
45 |
+
'pp_partner_KOjySVEy3ClX6G'
|
46 |
+
);
|
47 |
}
|
48 |
}
|
49 |
|
inc/logger.php
CHANGED
@@ -49,7 +49,7 @@ class Logger {
|
|
49 |
if ( 'yes' === Helper::get_setting( 'cpsw_debug_log' ) ) {
|
50 |
$log = wc_get_logger();
|
51 |
if ( $separator ) {
|
52 |
-
$message .= PHP_EOL . '
|
53 |
}
|
54 |
$log->log( $level, $message, [ 'source' => 'cpsw-stripe' ] );
|
55 |
}
|
49 |
if ( 'yes' === Helper::get_setting( 'cpsw_debug_log' ) ) {
|
50 |
$log = wc_get_logger();
|
51 |
if ( $separator ) {
|
52 |
+
$message .= PHP_EOL . '----';
|
53 |
}
|
54 |
$log->log( $level, $message, [ 'source' => 'cpsw-stripe' ] );
|
55 |
}
|
inc/traits/subscriptions.php
CHANGED
@@ -340,7 +340,7 @@ trait Subscriptions {
|
|
340 |
* @return object
|
341 |
*/
|
342 |
public function process_response( $response, $order ) {
|
343 |
-
Logger::info( 'Processing
|
344 |
|
345 |
$order_id = $order->get_id();
|
346 |
$captured = ( isset( $response->captured ) && $response->captured ) ? 'yes' : 'no';
|
340 |
* @return object
|
341 |
*/
|
342 |
public function process_response( $response, $order ) {
|
343 |
+
Logger::info( 'Processing: ' . $response->id );
|
344 |
|
345 |
$order_id = $order->get_id();
|
346 |
$captured = ( isset( $response->captured ) && $response->captured ) ? 'yes' : 'no';
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: brainstormforce
|
|
3 |
Tags: stripe, credit card
|
4 |
Requires at least: 5.4
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 1.2.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -20,6 +20,10 @@ Stripe for WooCommerce is a payment plugin that delivers a simple, secure way to
|
|
20 |
|
21 |
With Stripe you can accept payments from several card brands, from large global networks like Visa and Mastercard to local networks like Cartes Bancaires in France or Interac in Canada. Stripe also supports American Express, Discover, JCB, Diners Club and UnionPay.
|
22 |
|
|
|
|
|
|
|
|
|
23 |
## OFFER ONE CLICK CHECKOUT WITH EXPRESS PAY ##
|
24 |
|
25 |
The future of ecommerce checkout is express pay options that make it fast to place orders because your buyers don’t need to fill out the checkout form. All your buyers have to do is click one button and their order is complete.
|
@@ -89,6 +93,12 @@ Yes, Stripe for WooCommerce will work with all themes. If you run into any troub
|
|
89 |
= Do you offer support for this plugin? =
|
90 |
Yes, this plugin is fully supported. You can open a request here on the plugin page or visit our website to fill out our support request form.
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
== Screenshots ==
|
93 |
|
94 |
1. API Settings
|
@@ -98,6 +108,9 @@ Yes, this plugin is fully supported. You can open a request here on the plugin p
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
101 |
= 1.2.0 – TUESDAY, 4TH JANUARY 2022 =
|
102 |
* New: Supports Alipay payment method.
|
103 |
* New: Supports iDEAL payment method.
|
3 |
Tags: stripe, credit card
|
4 |
Requires at least: 5.4
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 1.2.1
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
20 |
|
21 |
With Stripe you can accept payments from several card brands, from large global networks like Visa and Mastercard to local networks like Cartes Bancaires in France or Interac in Canada. Stripe also supports American Express, Discover, JCB, Diners Club and UnionPay.
|
22 |
|
23 |
+
= Live Demo =
|
24 |
+
|
25 |
+
Visit [our site](https://stripe-demo.checkoutplugins.com) to see how this plugin works.
|
26 |
+
|
27 |
## OFFER ONE CLICK CHECKOUT WITH EXPRESS PAY ##
|
28 |
|
29 |
The future of ecommerce checkout is express pay options that make it fast to place orders because your buyers don’t need to fill out the checkout form. All your buyers have to do is click one button and their order is complete.
|
93 |
= Do you offer support for this plugin? =
|
94 |
Yes, this plugin is fully supported. You can open a request here on the plugin page or visit our website to fill out our support request form.
|
95 |
|
96 |
+
* **Support That Cares!**
|
97 |
+
|
98 |
+
We understand the need for a quality product backed by dedicated support that cares. We are here to listen to all your queries and help you make the most out of our plugin.
|
99 |
+
|
100 |
+
[Need help? We are just a click away!](https://checkoutplugins.com/support/)
|
101 |
+
|
102 |
== Screenshots ==
|
103 |
|
104 |
1. API Settings
|
108 |
|
109 |
== Changelog ==
|
110 |
|
111 |
+
= 1.2.1 - THURSDAY, 20TH JANUARY 2022 =
|
112 |
+
* Fix: Add payment method was not working.
|
113 |
+
|
114 |
= 1.2.0 – TUESDAY, 4TH JANUARY 2022 =
|
115 |
* New: Supports Alipay payment method.
|
116 |
* New: Supports iDEAL payment method.
|