Version Description
- Fix - Discounts were not applying to total with Apple Pay.
Download this release
Release Info
Developer | royho |
Plugin | WooCommerce Stripe Payment Gateway |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
includes/class-wc-gateway-stripe.php
CHANGED
@@ -121,7 +121,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
|
|
121 |
public function __construct() {
|
122 |
$this->id = 'stripe';
|
123 |
$this->method_title = __( 'Stripe', 'woocommerce-gateway-stripe' );
|
124 |
-
$this->method_description = __( 'Stripe works by adding credit card fields on the checkout and then sending the details to Stripe for verification.', 'woocommerce-gateway-stripe' );
|
125 |
$this->has_fields = true;
|
126 |
$this->view_transaction_url = 'https://dashboard.stripe.com/payments/%s';
|
127 |
$this->supports = array(
|
@@ -396,7 +396,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
|
|
396 |
|
397 |
// Show message if enabled and FORCE SSL is disabled and WordpressHTTPS plugin is not detected.
|
398 |
if ( ( function_exists( 'wc_site_is_https' ) && ! wc_site_is_https() ) && ( 'no' === get_option( 'woocommerce_force_ssl_checkout' ) && ! class_exists( 'WordPressHTTPS' ) ) ) {
|
399 |
-
echo '<div class="error stripe-ssl-message"><p>' . sprintf( __( 'Stripe is enabled, but the <a href="%s">force SSL option</a> is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - Stripe will only work in test mode.', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout' ) ) . '</p></div>';
|
400 |
}
|
401 |
}
|
402 |
|
121 |
public function __construct() {
|
122 |
$this->id = 'stripe';
|
123 |
$this->method_title = __( 'Stripe', 'woocommerce-gateway-stripe' );
|
124 |
+
$this->method_description = sprintf( __( 'Stripe works by adding credit card fields on the checkout and then sending the details to Stripe for verification. <a href="%1$s" target="_blank">Sign up</a> for a Stripe account, and <a href="%2$s" target="_blank">get your Stripe account keys</a>.', 'woocommerce-gateway-stripe' ), 'https://dashboard.stripe.com/register', 'https://dashboard.stripe.com/account/apikeys' );
|
125 |
$this->has_fields = true;
|
126 |
$this->view_transaction_url = 'https://dashboard.stripe.com/payments/%s';
|
127 |
$this->supports = array(
|
396 |
|
397 |
// Show message if enabled and FORCE SSL is disabled and WordpressHTTPS plugin is not detected.
|
398 |
if ( ( function_exists( 'wc_site_is_https' ) && ! wc_site_is_https() ) && ( 'no' === get_option( 'woocommerce_force_ssl_checkout' ) && ! class_exists( 'WordPressHTTPS' ) ) ) {
|
399 |
+
echo '<div class="error stripe-ssl-message"><p>' . sprintf( __( 'Stripe is enabled, but the <a href="%1$s">force SSL option</a> is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid <a href="%2$s" target="_blank">SSL certificate</a> - Stripe will only work in test mode.', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout' ), 'https://en.wikipedia.org/wiki/Transport_Layer_Security' ) . '</p></div>';
|
400 |
}
|
401 |
}
|
402 |
|
includes/class-wc-stripe-apple-pay.php
CHANGED
@@ -847,7 +847,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
|
|
847 |
$tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $this->dp );
|
848 |
$shipping = wc_format_decimal( WC()->cart->shipping_total, $this->dp );
|
849 |
$item_total = wc_format_decimal( WC()->cart->cart_contents_total, $this->dp ) + $discounts;
|
850 |
-
$order_total = wc_format_decimal( $item_total + $tax + $shipping, $this->dp );
|
851 |
|
852 |
if ( wc_tax_enabled() ) {
|
853 |
$items[] = array(
|
847 |
$tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $this->dp );
|
848 |
$shipping = wc_format_decimal( WC()->cart->shipping_total, $this->dp );
|
849 |
$item_total = wc_format_decimal( WC()->cart->cart_contents_total, $this->dp ) + $discounts;
|
850 |
+
$order_total = wc_format_decimal( $item_total + $tax + $shipping - $discounts, $this->dp );
|
851 |
|
852 |
if ( wc_tax_enabled() ) {
|
853 |
$items[] = array(
|
includes/legacy/class-wc-gateway-stripe.php
CHANGED
@@ -164,7 +164,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway {
|
|
164 |
|
165 |
// Show message if enabled and FORCE SSL is disabled and WordpressHTTPS plugin is not detected
|
166 |
if ( ( function_exists( 'wc_site_is_https' ) && ! wc_site_is_https() ) && ( 'no' === get_option( 'woocommerce_force_ssl_checkout' ) && ! class_exists( 'WordPressHTTPS' ) ) ) {
|
167 |
-
echo '<div class="error"><p>' . sprintf( __( 'Stripe is enabled, but the <a href="%s">force SSL option</a> is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - Stripe will only work in test mode.', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout' ) ) . '</p></div>';
|
168 |
}
|
169 |
}
|
170 |
|
164 |
|
165 |
// Show message if enabled and FORCE SSL is disabled and WordpressHTTPS plugin is not detected
|
166 |
if ( ( function_exists( 'wc_site_is_https' ) && ! wc_site_is_https() ) && ( 'no' === get_option( 'woocommerce_force_ssl_checkout' ) && ! class_exists( 'WordPressHTTPS' ) ) ) {
|
167 |
+
echo '<div class="error"><p>' . sprintf( __( 'Stripe is enabled, but the <a href="%1$s">force SSL option</a> is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid <a href="%2$s" target="_blank">SSL certificate</a> - Stripe will only work in test mode.', 'woocommerce-gateway-stripe' ), admin_url( 'admin.php?page=wc-settings&tab=checkout' ), 'https://en.wikipedia.org/wiki/Transport_Layer_Security' ) . '</p></div>';
|
168 |
}
|
169 |
}
|
170 |
|
includes/settings-stripe.php
CHANGED
@@ -153,7 +153,7 @@ return apply_filters( 'wc_stripe_settings',
|
|
153 |
),
|
154 |
'apple_pay_button_lang' => array(
|
155 |
'title' => __( 'Apple Pay Button Language', 'woocommerce-gateway-stripe' ),
|
156 |
-
'description' => __( 'Enter the 2 letter ISO code for the language you would like your Apple Pay Button to display in. Reference available ISO codes here
|
157 |
'type' => 'text',
|
158 |
'default' => 'en',
|
159 |
'desc_tip' => false,
|
153 |
),
|
154 |
'apple_pay_button_lang' => array(
|
155 |
'title' => __( 'Apple Pay Button Language', 'woocommerce-gateway-stripe' ),
|
156 |
+
'description' => sprintf( __( 'Enter the 2 letter ISO code for the language you would like your Apple Pay Button to display in. Reference available ISO codes <a href="%s" target="_blank">here</a>.', 'woocommerce-gateway-stripe' ), 'http://www.w3schools.com/tags/ref_language_codes.asp' ),
|
157 |
'type' => 'text',
|
158 |
'default' => 'en',
|
159 |
'desc_tip' => false,
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1an
|
|
3 |
Tags: credit card, stripe, woocommerce
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.7.2
|
6 |
-
Stable tag: 3.2.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -95,6 +95,9 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
98 |
= 3.2.0 =
|
99 |
* Fix - Authorized first orders were not able to be refund.
|
100 |
* Fix - Payment Request not honoring different shipping address in certain cases.
|
3 |
Tags: credit card, stripe, woocommerce
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.7.2
|
6 |
+
Stable tag: 3.2.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
95 |
|
96 |
== Changelog ==
|
97 |
|
98 |
+
= 3.2.1 =
|
99 |
+
* Fix - Discounts were not applying to total with Apple Pay.
|
100 |
+
|
101 |
= 3.2.0 =
|
102 |
* Fix - Authorized first orders were not able to be refund.
|
103 |
* Fix - Payment Request not honoring different shipping address in certain cases.
|
woocommerce-gateway-stripe.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Take credit card payments on your store using Stripe.
|
6 |
* Author: WooCommerce
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
-
* Version: 3.2.
|
9 |
* Text Domain: woocommerce-gateway-stripe
|
10 |
* Domain Path: /languages
|
11 |
*
|
@@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
32 |
/**
|
33 |
* Required minimums and constants
|
34 |
*/
|
35 |
-
define( 'WC_STRIPE_VERSION', '3.2.
|
36 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
37 |
define( 'WC_STRIPE_MIN_WC_VER', '2.5.0' );
|
38 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|
@@ -300,7 +300,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
300 |
if ( empty( $show_apple_pay_notice ) ) {
|
301 |
// @TODO remove this notice in the future.
|
302 |
?>
|
303 |
-
<div class="notice notice-warning wc-stripe-apple-pay-notice is-dismissible"><p><?php
|
304 |
|
305 |
<script type="application/javascript">
|
306 |
jQuery( '.wc-stripe-apple-pay-notice' ).on( 'click', '.notice-dismiss', function() {
|
@@ -319,7 +319,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
319 |
// @TODO remove this notice in the future.
|
320 |
?>
|
321 |
<div class="notice notice-warning wc-stripe-request-api-notice is-dismissible"><p><?php esc_html_e( 'New Feature! Stripe now supports Google Payment Request. Your customers can now use mobile phones with supported browsers such as Chrome to make purchases easier and faster.', 'woocommerce-gateway-stripe' ); ?></p></div>
|
322 |
-
|
323 |
<script type="application/javascript">
|
324 |
jQuery( '.wc-stripe-request-api-notice' ).on( 'click', '.notice-dismiss', function() {
|
325 |
var data = {
|
@@ -332,7 +332,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
332 |
|
333 |
<?php
|
334 |
}
|
335 |
-
|
336 |
foreach ( (array) $this->notices as $notice_key => $notice ) {
|
337 |
echo "<div class='" . esc_attr( $notice['class'] ) . "'><p>";
|
338 |
echo wp_kses( $notice['message'], array( 'a' => array( 'href' => array() ) ) );
|
@@ -368,7 +368,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
368 |
|
369 |
load_plugin_textdomain( 'woocommerce-gateway-stripe', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
|
370 |
add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateways' ) );
|
371 |
-
|
372 |
$load_addons = (
|
373 |
$this->subscription_support_enabled
|
374 |
||
|
@@ -443,7 +443,7 @@ if ( ! class_exists( 'WC_Stripe' ) ) :
|
|
443 |
return number_format( $balance_transaction->fee / 100, 2, '.', '' );
|
444 |
}
|
445 |
|
446 |
-
return number_format( $balance_transaction->net / 100, 2, '.', '' );
|
447 |
}
|
448 |
|
449 |
/**
|
5 |
* Description: Take credit card payments on your store using Stripe.
|
6 |
* Author: WooCommerce
|
7 |
* Author URI: https://woocommerce.com/
|
8 |
+
* Version: 3.2.1
|
9 |
* Text Domain: woocommerce-gateway-stripe
|
10 |
* Domain Path: /languages
|
11 |
*
|
32 |
/**
|
33 |
* Required minimums and constants
|
34 |
*/
|
35 |
+
define( 'WC_STRIPE_VERSION', '3.2.1' );
|
36 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
37 |
define( 'WC_STRIPE_MIN_WC_VER', '2.5.0' );
|
38 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|
300 |
if ( empty( $show_apple_pay_notice ) ) {
|
301 |
// @TODO remove this notice in the future.
|
302 |
?>
|
303 |
+
<div class="notice notice-warning wc-stripe-apple-pay-notice is-dismissible"><p><?php echo sprintf( esc_html__( 'New Feature! Stripe now supports %s. Your customers can now purchase your products even faster. Apple Pay has been enabled by default.', 'woocommerce-gateway-stripe' ), '<a href="https://woocommerce.com/apple-pay/">Apple Pay</a>'); ?></p></div>
|
304 |
|
305 |
<script type="application/javascript">
|
306 |
jQuery( '.wc-stripe-apple-pay-notice' ).on( 'click', '.notice-dismiss', function() {
|
319 |
// @TODO remove this notice in the future.
|
320 |
?>
|
321 |
<div class="notice notice-warning wc-stripe-request-api-notice is-dismissible"><p><?php esc_html_e( 'New Feature! Stripe now supports Google Payment Request. Your customers can now use mobile phones with supported browsers such as Chrome to make purchases easier and faster.', 'woocommerce-gateway-stripe' ); ?></p></div>
|
322 |
+
|
323 |
<script type="application/javascript">
|
324 |
jQuery( '.wc-stripe-request-api-notice' ).on( 'click', '.notice-dismiss', function() {
|
325 |
var data = {
|
332 |
|
333 |
<?php
|
334 |
}
|
335 |
+
|
336 |
foreach ( (array) $this->notices as $notice_key => $notice ) {
|
337 |
echo "<div class='" . esc_attr( $notice['class'] ) . "'><p>";
|
338 |
echo wp_kses( $notice['message'], array( 'a' => array( 'href' => array() ) ) );
|
368 |
|
369 |
load_plugin_textdomain( 'woocommerce-gateway-stripe', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
|
370 |
add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateways' ) );
|
371 |
+
|
372 |
$load_addons = (
|
373 |
$this->subscription_support_enabled
|
374 |
||
|
443 |
return number_format( $balance_transaction->fee / 100, 2, '.', '' );
|
444 |
}
|
445 |
|
446 |
+
return number_format( $balance_transaction->net / 100, 2, '.', '' );
|
447 |
}
|
448 |
|
449 |
/**
|