Version Description
- 2017-07-11 =
- Fix - Apple Pay button displaying in non Safari browser.
- Fix - Apple Pay with coupon not applying to total.
Download this release
Release Info
| Developer | royho |
| Plugin | |
| Version | 3.2.2 |
| Comparing to | |
| See all releases | |
Code changes from version 3.2.1 to 3.2.2
includes/class-wc-gateway-stripe.php
CHANGED
|
@@ -202,9 +202,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway_CC {
|
|
| 202 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/mastercard' . $ext ) . '" alt="Mastercard" width="32" ' . $style . ' />';
|
| 203 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/amex' . $ext ) . '" alt="Amex" width="32" ' . $style . ' />';
|
| 204 |
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
if ( 'US' === $base_location['country'] ) {
|
| 208 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/discover' . $ext ) . '" alt="Discover" width="32" ' . $style . ' />';
|
| 209 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/jcb' . $ext ) . '" alt="JCB" width="32" ' . $style . ' />';
|
| 210 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" ' . $style . ' />';
|
| 202 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/mastercard' . $ext ) . '" alt="Mastercard" width="32" ' . $style . ' />';
|
| 203 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/amex' . $ext ) . '" alt="Amex" width="32" ' . $style . ' />';
|
| 204 |
|
| 205 |
+
if ( 'USD' === get_woocommerce_currency() ) {
|
|
|
|
|
|
|
| 206 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/discover' . $ext ) . '" alt="Discover" width="32" ' . $style . ' />';
|
| 207 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/jcb' . $ext ) . '" alt="JCB" width="32" ' . $style . ' />';
|
| 208 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" ' . $style . ' />';
|
includes/class-wc-stripe-apple-pay.php
CHANGED
|
@@ -407,7 +407,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
|
|
| 407 |
|
| 408 |
?>
|
| 409 |
<div class="apple-pay-button-wrapper">
|
| 410 |
-
<button class="apple-pay-button" lang="<?php echo esc_attr( $this->apple_pay_button_lang ); ?>" style="-webkit-appearance: -apple-pay-button; -apple-pay-button-type: buy; -apple-pay-button-style: <?php echo esc_attr( $this->apple_pay_button ); ?>;" alt="<?php esc_attr_e( 'Buy with Apple Pay', 'woocommerce-gateway-stripe' ); ?>"></button>
|
| 411 |
</div>
|
| 412 |
<?php
|
| 413 |
}
|
|
@@ -880,7 +880,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
|
|
| 880 |
* Create order programatically.
|
| 881 |
*
|
| 882 |
* @since 3.1.0
|
| 883 |
-
* @version 3.
|
| 884 |
* @param array $data
|
| 885 |
* @return object $order
|
| 886 |
*/
|
|
@@ -1114,7 +1114,7 @@ class WC_Stripe_Apple_Pay extends WC_Gateway_Stripe {
|
|
| 1114 |
$tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $this->dp );
|
| 1115 |
$shipping = wc_format_decimal( WC()->cart->shipping_total, $this->dp );
|
| 1116 |
$item_total = wc_format_decimal( WC()->cart->cart_contents_total, $this->dp ) + $discounts;
|
| 1117 |
-
$order_total = wc_format_decimal( $item_total + $tax + $shipping, $this->dp );
|
| 1118 |
|
| 1119 |
$order->set_total( $order_total );
|
| 1120 |
$order->save();
|
| 407 |
|
| 408 |
?>
|
| 409 |
<div class="apple-pay-button-wrapper">
|
| 410 |
+
<button class="apple-pay-button" lang="<?php echo esc_attr( $this->apple_pay_button_lang ); ?>" style="-webkit-appearance: -apple-pay-button; -apple-pay-button-type: buy; -apple-pay-button-style: <?php echo esc_attr( $this->apple_pay_button ); ?>;display:none;" alt="<?php esc_attr_e( 'Buy with Apple Pay', 'woocommerce-gateway-stripe' ); ?>"></button>
|
| 411 |
</div>
|
| 412 |
<?php
|
| 413 |
}
|
| 880 |
* Create order programatically.
|
| 881 |
*
|
| 882 |
* @since 3.1.0
|
| 883 |
+
* @version 3.2.3
|
| 884 |
* @param array $data
|
| 885 |
* @return object $order
|
| 886 |
*/
|
| 1114 |
$tax = wc_format_decimal( WC()->cart->tax_total + WC()->cart->shipping_tax_total, $this->dp );
|
| 1115 |
$shipping = wc_format_decimal( WC()->cart->shipping_total, $this->dp );
|
| 1116 |
$item_total = wc_format_decimal( WC()->cart->cart_contents_total, $this->dp ) + $discounts;
|
| 1117 |
+
$order_total = wc_format_decimal( $item_total + $tax + $shipping - $discounts, $this->dp );
|
| 1118 |
|
| 1119 |
$order->set_total( $order_total );
|
| 1120 |
$order->save();
|
includes/legacy/class-wc-gateway-stripe.php
CHANGED
|
@@ -87,9 +87,7 @@ class WC_Gateway_Stripe extends WC_Payment_Gateway {
|
|
| 87 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/mastercard' . $ext ) . '" alt="Mastercard" width="32" ' . $style . ' />';
|
| 88 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/amex' . $ext ) . '" alt="Amex" width="32" ' . $style . ' />';
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
if ( 'US' === $base_location['country'] ) {
|
| 93 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/discover' . $ext ) . '" alt="Discover" width="32" ' . $style . ' />';
|
| 94 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/jcb' . $ext ) . '" alt="JCB" width="32" ' . $style . ' />';
|
| 95 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" ' . $style . ' />';
|
| 87 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/mastercard' . $ext ) . '" alt="Mastercard" width="32" ' . $style . ' />';
|
| 88 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/amex' . $ext ) . '" alt="Amex" width="32" ' . $style . ' />';
|
| 89 |
|
| 90 |
+
if ( 'USD' === get_woocommerce_currency() ) {
|
|
|
|
|
|
|
| 91 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/discover' . $ext ) . '" alt="Discover" width="32" ' . $style . ' />';
|
| 92 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/jcb' . $ext ) . '" alt="JCB" width="32" ' . $style . ' />';
|
| 93 |
$icon .= '<img src="' . WC_HTTPS::force_https_url( WC()->plugin_url() . '/assets/images/icons/credit-cards/diners' . $ext ) . '" alt="Diners" width="32" ' . $style . ' />';
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, dsmithweb, fullysupportedphil, corsonr, deskroid, luminus, tiagonoronha, zandyring, bor0
|
| 3 |
Tags: credit card, stripe, woocommerce
|
| 4 |
Requires at least: 4.4
|
| 5 |
-
Tested up to: 4.
|
| 6 |
-
Stable tag: 3.2.
|
| 7 |
License: GPLv3
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
|
@@ -95,6 +95,10 @@ If you get stuck, you can ask for help in the Plugin Forum.
|
|
| 95 |
|
| 96 |
== Changelog ==
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
= 3.2.1 =
|
| 99 |
* Fix - Discounts were not applying to total with Apple Pay.
|
| 100 |
|
| 2 |
Contributors: automattic, woothemes, mikejolley, akeda, royho, mattyza, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, dsmithweb, fullysupportedphil, corsonr, deskroid, luminus, tiagonoronha, zandyring, bor0
|
| 3 |
Tags: credit card, stripe, woocommerce
|
| 4 |
Requires at least: 4.4
|
| 5 |
+
Tested up to: 4.8
|
| 6 |
+
Stable tag: 3.2.2
|
| 7 |
License: GPLv3
|
| 8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 9 |
|
| 95 |
|
| 96 |
== Changelog ==
|
| 97 |
|
| 98 |
+
= 3.2.2 - 2017-07-11 =
|
| 99 |
+
* Fix - Apple Pay button displaying in non Safari browser.
|
| 100 |
+
* Fix - Apple Pay with coupon not applying to total.
|
| 101 |
+
|
| 102 |
= 3.2.1 =
|
| 103 |
* Fix - Discounts were not applying to total with Apple Pay.
|
| 104 |
|
woocommerce-gateway-stripe.php
CHANGED
|
@@ -5,7 +5,9 @@
|
|
| 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 +34,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__ );
|
| 5 |
* Description: Take credit card payments on your store using Stripe.
|
| 6 |
* Author: WooCommerce
|
| 7 |
* Author URI: https://woocommerce.com/
|
| 8 |
+
* Version: 3.2.2
|
| 9 |
+
* Requires at least: 4.4
|
| 10 |
+
* Tested up to: 4.8
|
| 11 |
* Text Domain: woocommerce-gateway-stripe
|
| 12 |
* Domain Path: /languages
|
| 13 |
*
|
| 34 |
/**
|
| 35 |
* Required minimums and constants
|
| 36 |
*/
|
| 37 |
+
define( 'WC_STRIPE_VERSION', '3.2.2' );
|
| 38 |
define( 'WC_STRIPE_MIN_PHP_VER', '5.6.0' );
|
| 39 |
define( 'WC_STRIPE_MIN_WC_VER', '2.5.0' );
|
| 40 |
define( 'WC_STRIPE_MAIN_FILE', __FILE__ );
|
