Version Description
[2017-3-25] =
- Enhancement: Default PayPal Credit to On, and ensure it is functional for our 1.0 theme engine.
Download this release
Release Info
| Developer | JustinSainton |
| Plugin | |
| Version | 3.12.2 |
| Comparing to | |
| See all releases | |
Code changes from version 3.12.1 to 3.12.2
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://wpecommerce.org
|
|
| 4 |
Tags: e-commerce, digital downloads, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
|
| 5 |
Requires at least: 4.5
|
| 6 |
Tested up to: 4.7.2
|
| 7 |
-
Stable tag: 3.12.
|
| 8 |
|
| 9 |
WP eCommerce is a free, powerful plugin that empowers you to sell anything online, quickly and easily.
|
| 10 |
|
|
@@ -36,7 +36,11 @@ After upgrading from earlier versions look for link "Update Store". This will up
|
|
| 36 |
|
| 37 |
== Changelog ==
|
| 38 |
|
| 39 |
-
= 3.12.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
* New: Addition of PayPal Credit to PayPal Express Checkout.
|
| 42 |
* Fix: Ensure WPEC works via WP-CLI.
|
| 4 |
Tags: e-commerce, digital downloads, wp-e-commerce, shop, cart, paypal, authorize, stock control, ecommerce, shipping, tax
|
| 5 |
Requires at least: 4.5
|
| 6 |
Tested up to: 4.7.2
|
| 7 |
+
Stable tag: 3.12.2
|
| 8 |
|
| 9 |
WP eCommerce is a free, powerful plugin that empowers you to sell anything online, quickly and easily.
|
| 10 |
|
| 36 |
|
| 37 |
== Changelog ==
|
| 38 |
|
| 39 |
+
= 3.12.2 [2017-3-25] =
|
| 40 |
+
|
| 41 |
+
* Enhancement: Default PayPal Credit to On, and ensure it is functional for our 1.0 theme engine.
|
| 42 |
+
|
| 43 |
+
= 3.12.1 [2017-3-24] =
|
| 44 |
|
| 45 |
* New: Addition of PayPal Credit to PayPal Express Checkout.
|
| 46 |
* Fix: Ensure WPEC works via WP-CLI.
|
wp-shopping-cart.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: WP eCommerce
|
| 4 |
* Plugin URI: http://wpecommerce.org/
|
| 5 |
* Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="http://wpecommerce.org" target="_blank">WPeCommerce.org</a> | <a href="https://wordpress.org/support/plugin/wp-e-commerce/" target="_blank">Support Forum</a> | <a href="http://docs.wpecommerce.org/" target="_blank">Documentation</a>
|
| 6 |
-
* Version: 3.12.
|
| 7 |
* Author: WP eCommerce
|
| 8 |
* Author URI: http://wpecommerce.org/
|
| 9 |
* Text Domain: wp-e-commerce
|
| 3 |
* Plugin Name: WP eCommerce
|
| 4 |
* Plugin URI: http://wpecommerce.org/
|
| 5 |
* Description: A plugin that provides a WordPress Shopping Cart. See also: <a href="http://wpecommerce.org" target="_blank">WPeCommerce.org</a> | <a href="https://wordpress.org/support/plugin/wp-e-commerce/" target="_blank">Support Forum</a> | <a href="http://docs.wpecommerce.org/" target="_blank">Documentation</a>
|
| 6 |
+
* Version: 3.12.2
|
| 7 |
* Author: WP eCommerce
|
| 8 |
* Author URI: http://wpecommerce.org/
|
| 9 |
* Text Domain: wp-e-commerce
|
wpsc-components/merchant-core-v3/gateways/paypal-express-checkout.php
CHANGED
|
@@ -54,14 +54,24 @@ class WPSC_Payment_Gateway_Paypal_Express_Checkout extends WPSC_Payment_Gateway
|
|
| 54 |
if ( (bool) $this->setting->get( 'incontext' ) ) {
|
| 55 |
add_action( 'wp_enqueue_scripts', array( $this, 'incontext_load_scripts' ) );
|
| 56 |
}
|
| 57 |
-
|
| 58 |
// PayPal Credit Button
|
| 59 |
if ( (bool) $this->setting->get( 'credit' ) ) {
|
|
|
|
| 60 |
add_action( 'wpsc_cart_item_table_form_actions_left', array( $this, 'add_credit_button' ), 1, 2 );
|
| 61 |
}
|
|
|
|
| 62 |
}
|
| 63 |
}
|
| 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
public function incontext_load_scripts() {
|
| 66 |
|
| 67 |
$is_cart = wpsc_is_theme_engine( '1.0' ) ? wpsc_is_checkout() : ( wpsc_is_checkout() || wpsc_is_cart() );
|
|
@@ -113,7 +123,7 @@ class WPSC_Payment_Gateway_Paypal_Express_Checkout extends WPSC_Payment_Gateway
|
|
| 113 |
echo '<em class="paypal-express-credit-separator">' . __( '— or —', 'wp-e-commerce' ) . '</em>';
|
| 114 |
}
|
| 115 |
}
|
| 116 |
-
|
| 117 |
/**
|
| 118 |
* Return the ExpressCheckout Shortcut redirection URL
|
| 119 |
*
|
|
@@ -237,7 +247,7 @@ class WPSC_Payment_Gateway_Paypal_Express_Checkout extends WPSC_Payment_Gateway
|
|
| 237 |
'sessionid' => $sessionid,
|
| 238 |
) );
|
| 239 |
|
| 240 |
-
if (
|
| 241 |
$tax = $wpsc_cart->calculate_total_tax();
|
| 242 |
$tax_percentage = $wpsc_cart->tax_percentage;
|
| 243 |
} else {
|
|
@@ -272,7 +282,8 @@ class WPSC_Payment_Gateway_Paypal_Express_Checkout extends WPSC_Payment_Gateway
|
|
| 272 |
// Save an empty Form
|
| 273 |
$form = WPSC_Checkout_Form::get();
|
| 274 |
$fields = $form->get_fields();
|
| 275 |
-
|
|
|
|
| 276 |
|
| 277 |
// Return Customer to Review Order Page if there is Shipping
|
| 278 |
add_filter( 'wpsc_paypal_express_checkout_transact_url', array( &$this, 'review_order_url' ) );
|
|
@@ -526,7 +537,7 @@ class WPSC_Payment_Gateway_Paypal_Express_Checkout extends WPSC_Payment_Gateway
|
|
| 526 |
}
|
| 527 |
|
| 528 |
// Save details to the Forms Table
|
| 529 |
-
WPSC_Checkout_Form_Data::save_form( $this->purchase_log, $fields );
|
| 530 |
}
|
| 531 |
|
| 532 |
/**
|
|
@@ -1004,8 +1015,8 @@ class WPSC_Payment_Gateway_Paypal_Express_Checkout extends WPSC_Payment_Gateway
|
|
| 1004 |
<label for="wpsc-paypal-express-cart-border"><?php _e( 'Enable PayPal Credit', 'wp-e-commerce' ); ?></label>
|
| 1005 |
</td>
|
| 1006 |
<td>
|
| 1007 |
-
<label><input <?php checked( $this->setting->get( 'credit', '
|
| 1008 |
-
<label><input <?php checked( (bool) $this->setting->get( 'credit', '
|
| 1009 |
</td>
|
| 1010 |
</tr>
|
| 1011 |
<!-- Currency Conversion -->
|
| 54 |
if ( (bool) $this->setting->get( 'incontext' ) ) {
|
| 55 |
add_action( 'wp_enqueue_scripts', array( $this, 'incontext_load_scripts' ) );
|
| 56 |
}
|
| 57 |
+
|
| 58 |
// PayPal Credit Button
|
| 59 |
if ( (bool) $this->setting->get( 'credit' ) ) {
|
| 60 |
+
add_action( 'wpsc_gateway_v2_inside_gateway_label', array( $this, 'add_credit_button_tev1' ) );
|
| 61 |
add_action( 'wpsc_cart_item_table_form_actions_left', array( $this, 'add_credit_button' ), 1, 2 );
|
| 62 |
}
|
| 63 |
+
|
| 64 |
}
|
| 65 |
}
|
| 66 |
|
| 67 |
+
public function add_credit_button_tev1( $gateway ) {
|
| 68 |
+
if ( 'paypal-express-checkout' !== $gateway ) { return; }
|
| 69 |
+
|
| 70 |
+
$url = $this->get_shortcut_url( 'credit_process' );
|
| 71 |
+
echo '<em class="paypal-express-credit-separator">' . __( '— or —', 'wp-e-commerce' ) . '</em>';
|
| 72 |
+
echo '<a class="express-checkout-credit-button" href="'. esc_url( $url ) .'" id="express-checkout-cart-button"><img src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/ppcredit-logo-small.png" alt="' . __( 'PayPal Credit', 'wp-e-commerce' ) . '" /></a>';
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
public function incontext_load_scripts() {
|
| 76 |
|
| 77 |
$is_cart = wpsc_is_theme_engine( '1.0' ) ? wpsc_is_checkout() : ( wpsc_is_checkout() || wpsc_is_cart() );
|
| 123 |
echo '<em class="paypal-express-credit-separator">' . __( '— or —', 'wp-e-commerce' ) . '</em>';
|
| 124 |
}
|
| 125 |
}
|
| 126 |
+
|
| 127 |
/**
|
| 128 |
* Return the ExpressCheckout Shortcut redirection URL
|
| 129 |
*
|
| 247 |
'sessionid' => $sessionid,
|
| 248 |
) );
|
| 249 |
|
| 250 |
+
if ( wpsc_tax_isincluded() ) {
|
| 251 |
$tax = $wpsc_cart->calculate_total_tax();
|
| 252 |
$tax_percentage = $wpsc_cart->tax_percentage;
|
| 253 |
} else {
|
| 282 |
// Save an empty Form
|
| 283 |
$form = WPSC_Checkout_Form::get();
|
| 284 |
$fields = $form->get_fields();
|
| 285 |
+
|
| 286 |
+
WPSC_Checkout_Form_Data::save_form( $purchase_log, $fields, array(), false );
|
| 287 |
|
| 288 |
// Return Customer to Review Order Page if there is Shipping
|
| 289 |
add_filter( 'wpsc_paypal_express_checkout_transact_url', array( &$this, 'review_order_url' ) );
|
| 537 |
}
|
| 538 |
|
| 539 |
// Save details to the Forms Table
|
| 540 |
+
WPSC_Checkout_Form_Data::save_form( $this->purchase_log, $fields, array(), false );
|
| 541 |
}
|
| 542 |
|
| 543 |
/**
|
| 1015 |
<label for="wpsc-paypal-express-cart-border"><?php _e( 'Enable PayPal Credit', 'wp-e-commerce' ); ?></label>
|
| 1016 |
</td>
|
| 1017 |
<td>
|
| 1018 |
+
<label><input <?php checked( $this->setting->get( 'credit', '1' ) ); ?> type="radio" name="<?php echo esc_attr( $this->setting->get_field_name( 'credit' ) ); ?>" value="1" /> <?php _e( 'Yes', 'wp-e-commerce' ); ?></label>
|
| 1019 |
+
<label><input <?php checked( (bool) $this->setting->get( 'credit', '1' ), false ); ?> type="radio" name="<?php echo esc_attr( $this->setting->get_field_name( 'credit' ) ); ?>" value="0" /> <?php _e( 'No', 'wp-e-commerce' ); ?></label>
|
| 1020 |
</td>
|
| 1021 |
</tr>
|
| 1022 |
<!-- Currency Conversion -->
|
wpsc-core/wpsc-constants.php
CHANGED
|
@@ -55,7 +55,7 @@ function wpsc_core_constants() {
|
|
| 55 |
|
| 56 |
// Define Plugin version
|
| 57 |
if ( ! defined( 'WPSC_VERSION' ) ) {
|
| 58 |
-
define( 'WPSC_VERSION' , '3.12.
|
| 59 |
}
|
| 60 |
|
| 61 |
if ( ! defined( 'WPSC_MINOR_VERSION' ) ) {
|
|
@@ -63,7 +63,7 @@ function wpsc_core_constants() {
|
|
| 63 |
}
|
| 64 |
|
| 65 |
if ( ! defined( 'WPSC_PRESENTABLE_VERSION' ) ) {
|
| 66 |
-
define( 'WPSC_PRESENTABLE_VERSION', '3.12.
|
| 67 |
}
|
| 68 |
|
| 69 |
// Define a salt to use when we hash, WPSC_SALT may be defined for us in our config file, so check first
|
| 55 |
|
| 56 |
// Define Plugin version
|
| 57 |
if ( ! defined( 'WPSC_VERSION' ) ) {
|
| 58 |
+
define( 'WPSC_VERSION' , '3.12.2' );
|
| 59 |
}
|
| 60 |
|
| 61 |
if ( ! defined( 'WPSC_MINOR_VERSION' ) ) {
|
| 63 |
}
|
| 64 |
|
| 65 |
if ( ! defined( 'WPSC_PRESENTABLE_VERSION' ) ) {
|
| 66 |
+
define( 'WPSC_PRESENTABLE_VERSION', '3.12.2' );
|
| 67 |
}
|
| 68 |
|
| 69 |
// Define a salt to use when we hash, WPSC_SALT may be defined for us in our config file, so check first
|
