Version Description
- 2018-07-04 =
- Fix - GDPR Fatal error exporting user data when they have PPEC subscriptions.
- Fix - PayPal Credit still being disabled by default.
- Update - Rename 'PayPal Express Checkout' to 'PayPal Checkout'.
- Fix - Missing PayPal branding in "Buy Now" Smart Payment Button.
- Fix - PHP warning when PayPal Credit not supported and no funding methods hidden.
- Fix - Smart Payment Buttons gateway not inheriting IPN and subscription handling.
- Fix - Single product Smart Payment Button failing without existing session.
- Fix - When cart is empty, JS error on cart page and mini-cart payment buttons showing.
- Add - Locale filter.
Download this release
Release Info
Developer | bor0 |
Plugin | WooCommerce PayPal Express Checkout Payment Gateway |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- assets/css/wc-gateway-ppec-frontend-cart.css +3 -0
- assets/js/wc-gateway-ppec-smart-payment-buttons.js +2 -1
- changelog.txt +11 -0
- includes/abstracts/abstract-wc-gateway-ppec.php +1 -1
- includes/class-wc-gateway-ppec-admin-handler.php +3 -3
- includes/class-wc-gateway-ppec-cart-handler.php +18 -5
- includes/class-wc-gateway-ppec-checkout-handler.php +1 -1
- includes/class-wc-gateway-ppec-gateway-loader.php +6 -1
- includes/class-wc-gateway-ppec-plugin.php +8 -8
- includes/class-wc-gateway-ppec-privacy.php +5 -5
- includes/class-wc-gateway-ppec-session-data.php +1 -1
- includes/class-wc-gateway-ppec-settings.php +1 -1
- includes/class-wc-gateway-ppec-with-spb-addons.php +60 -0
- includes/class-wc-gateway-ppec-with-spb.php +4 -4
- includes/settings/settings-ppec.php +12 -12
- readme.txt +23 -10
- woocommerce-gateway-paypal-express-checkout.php +4 -4
assets/css/wc-gateway-ppec-frontend-cart.css
CHANGED
@@ -34,3 +34,6 @@
|
|
34 |
.site-header .widget_shopping_cart p.buttons.wcppec-cart-widget-spb {
|
35 |
padding: 0 1em 1em;
|
36 |
}
|
|
|
|
|
|
34 |
.site-header .widget_shopping_cart p.buttons.wcppec-cart-widget-spb {
|
35 |
padding: 0 1em 1em;
|
36 |
}
|
37 |
+
.site-header .widget_shopping_cart .woocommerce-mini-cart__empty-message + p.buttons.wcppec-cart-widget-spb {
|
38 |
+
display: none;
|
39 |
+
}
|
assets/js/wc-gateway-ppec-smart-payment-buttons.js
CHANGED
@@ -44,6 +44,7 @@
|
|
44 |
layout: button_layout,
|
45 |
size: button_size,
|
46 |
label: button_label,
|
|
|
47 |
tagline: false,
|
48 |
},
|
49 |
|
@@ -66,7 +67,7 @@
|
|
66 |
resolve();
|
67 |
}
|
68 |
} ).then( function() {
|
69 |
-
// Make
|
70 |
return paypal.request( {
|
71 |
method: 'post',
|
72 |
url: wc_ppec_context.start_checkout_url,
|
44 |
layout: button_layout,
|
45 |
size: button_size,
|
46 |
label: button_label,
|
47 |
+
branding: true,
|
48 |
tagline: false,
|
49 |
},
|
50 |
|
67 |
resolve();
|
68 |
}
|
69 |
} ).then( function() {
|
70 |
+
// Make PayPal Checkout initialization request.
|
71 |
return paypal.request( {
|
72 |
method: 'post',
|
73 |
url: wc_ppec_context.start_checkout_url,
|
changelog.txt
CHANGED
@@ -1,5 +1,16 @@
|
|
1 |
*** Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 1.6.0 - 2018-06-27 =
|
4 |
* Add - Smart Payment Buttons mode as alternative to directly embedded image links for all instances of PayPal button.
|
5 |
* Fix - Help tip alignment for image settings.
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 1.6.1 - 2018-07-04 =
|
4 |
+
* Fix - GDPR Fatal error exporting user data when they have PPEC subscriptions.
|
5 |
+
* Fix - PayPal Credit still being disabled by default.
|
6 |
+
* Update - Rename 'PayPal Express Checkout' to 'PayPal Checkout'.
|
7 |
+
* Fix - Missing PayPal branding in "Buy Now" Smart Payment Button.
|
8 |
+
* Fix - PHP warning when PayPal Credit not supported and no funding methods hidden.
|
9 |
+
* Fix - Smart Payment Buttons gateway not inheriting IPN and subscription handling.
|
10 |
+
* Fix - Single product Smart Payment Button failing without existing session.
|
11 |
+
* Fix - When cart is empty, JS error on cart page and mini-cart payment buttons showing.
|
12 |
+
* Add - Locale filter.
|
13 |
+
|
14 |
= 1.6.0 - 2018-06-27 =
|
15 |
* Add - Smart Payment Buttons mode as alternative to directly embedded image links for all instances of PayPal button.
|
16 |
* Fix - Help tip alignment for image settings.
|
includes/abstracts/abstract-wc-gateway-ppec.php
CHANGED
@@ -15,7 +15,7 @@ abstract class WC_Gateway_PPEC extends WC_Payment_Gateway {
|
|
15 |
public function __construct() {
|
16 |
$this->has_fields = false;
|
17 |
$this->supports[] = 'refunds';
|
18 |
-
$this->method_title = __( 'PayPal
|
19 |
$this->method_description = __( 'Allow customers to conveniently checkout directly with PayPal.', 'woocommerce-gateway-paypal-express-checkout' );
|
20 |
|
21 |
if ( empty( $_GET['woo-paypal-return'] ) ) {
|
15 |
public function __construct() {
|
16 |
$this->has_fields = false;
|
17 |
$this->supports[] = 'refunds';
|
18 |
+
$this->method_title = __( 'PayPal Checkout', 'woocommerce-gateway-paypal-express-checkout' );
|
19 |
$this->method_description = __( 'Allow customers to conveniently checkout directly with PayPal.', 'woocommerce-gateway-paypal-express-checkout' );
|
20 |
|
21 |
if ( empty( $_GET['woo-paypal-return'] ) ) {
|
includes/class-wc-gateway-ppec-admin-handler.php
CHANGED
@@ -86,7 +86,7 @@ class WC_Gateway_PPEC_Admin_Handler {
|
|
86 |
|
87 |
/**
|
88 |
* Prevent PPEC Credit showing up in the admin, because it shares its settings
|
89 |
-
* with the PayPal
|
90 |
*
|
91 |
* @param array $sections List of sections in checkout
|
92 |
*
|
@@ -173,7 +173,7 @@ class WC_Gateway_PPEC_Admin_Handler {
|
|
173 |
update_post_meta( $order_id, '_transaction_id', $result['TRANSACTIONID'] );
|
174 |
}
|
175 |
|
176 |
-
$order->add_order_note( sprintf( __( 'PayPal
|
177 |
}
|
178 |
}
|
179 |
}
|
@@ -217,7 +217,7 @@ class WC_Gateway_PPEC_Admin_Handler {
|
|
217 |
if ( is_wp_error( $result ) ) {
|
218 |
$order->add_order_note( __( 'Unable to void charge!', 'woocommerce-gateway-paypal-express-checkout' ) . ' ' . $result->get_error_message() );
|
219 |
} else {
|
220 |
-
$order->add_order_note( sprintf( __( 'PayPal
|
221 |
}
|
222 |
}
|
223 |
}
|
86 |
|
87 |
/**
|
88 |
* Prevent PPEC Credit showing up in the admin, because it shares its settings
|
89 |
+
* with the PayPal Checkout class.
|
90 |
*
|
91 |
* @param array $sections List of sections in checkout
|
92 |
*
|
173 |
update_post_meta( $order_id, '_transaction_id', $result['TRANSACTIONID'] );
|
174 |
}
|
175 |
|
176 |
+
$order->add_order_note( sprintf( __( 'PayPal Checkout charge complete (Charge ID: %s)', 'woocommerce-gateway-paypal-express-checkout' ), $trans_id ) );
|
177 |
}
|
178 |
}
|
179 |
}
|
217 |
if ( is_wp_error( $result ) ) {
|
218 |
$order->add_order_note( __( 'Unable to void charge!', 'woocommerce-gateway-paypal-express-checkout' ) . ' ' . $result->get_error_message() );
|
219 |
} else {
|
220 |
+
$order->add_order_note( sprintf( __( 'PayPal Checkout charge voided (Charge ID: %s)', 'woocommerce-gateway-paypal-express-checkout' ), $trans_id ) );
|
221 |
}
|
222 |
}
|
223 |
}
|
includes/class-wc-gateway-ppec-cart-handler.php
CHANGED
@@ -51,7 +51,7 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
-
* Generates the cart for
|
55 |
*
|
56 |
* @since 1.4.0
|
57 |
*/
|
@@ -277,7 +277,9 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
277 |
|
278 |
if ( ! wc_gateway_ppec_is_credit_supported() ) {
|
279 |
$data['credit_enabled'] = 'no';
|
280 |
-
if ( !
|
|
|
|
|
281 |
$data['hide_funding_methods'][] = 'CREDIT';
|
282 |
}
|
283 |
}
|
@@ -301,7 +303,7 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
301 |
|
302 |
wp_enqueue_style( 'wc-gateway-ppec-frontend-cart', wc_gateway_ppec()->plugin_url . 'assets/css/wc-gateway-ppec-frontend-cart.css' );
|
303 |
|
304 |
-
$is_cart = is_cart() && 'yes' === $settings->cart_checkout_enabled;
|
305 |
$is_product = is_product() && 'yes' === $settings->checkout_on_single_product_enabled;
|
306 |
$is_checkout = is_checkout() && 'yes' === $settings->mark_enabled && ! wc_gateway_ppec()->checkout->has_active_session();
|
307 |
$page = $is_cart ? 'cart' : ( $is_product ? 'product' : ( $is_checkout ? 'checkout' : null ) );
|
@@ -331,7 +333,7 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
331 |
'page' => $page,
|
332 |
'button_color' => $settings->button_color,
|
333 |
'button_shape' => $settings->button_shape,
|
334 |
-
'start_checkout_nonce' =>
|
335 |
'start_checkout_url' => WC_AJAX::get_endpoint( 'wc_ppec_start_checkout' ),
|
336 |
);
|
337 |
|
@@ -362,13 +364,24 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
362 |
wp_enqueue_script( 'wc-gateway-ppec-generate-cart', wc_gateway_ppec()->plugin_url . 'assets/js/wc-gateway-ppec-generate-cart.js', array( 'jquery' ), wc_gateway_ppec()->version, true );
|
363 |
wp_localize_script( 'wc-gateway-ppec-generate-cart', 'wc_ppec_generate_cart_context',
|
364 |
array(
|
365 |
-
'generate_cart_nonce' =>
|
366 |
'ajaxurl' => WC_AJAX::get_endpoint( 'wc_ppec_generate_cart' ),
|
367 |
)
|
368 |
);
|
369 |
}
|
370 |
}
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
/**
|
373 |
* @deprecated
|
374 |
*/
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
+
* Generates the cart for PayPal Checkout on a product level.
|
55 |
*
|
56 |
* @since 1.4.0
|
57 |
*/
|
277 |
|
278 |
if ( ! wc_gateway_ppec_is_credit_supported() ) {
|
279 |
$data['credit_enabled'] = 'no';
|
280 |
+
if ( ! is_array( $data['hide_funding_methods'] ) ) {
|
281 |
+
$data['hide_funding_methods'] = array( 'CREDIT' );
|
282 |
+
} elseif ( ! in_array( 'CREDIT', $data['hide_funding_methods'] ) ) {
|
283 |
$data['hide_funding_methods'][] = 'CREDIT';
|
284 |
}
|
285 |
}
|
303 |
|
304 |
wp_enqueue_style( 'wc-gateway-ppec-frontend-cart', wc_gateway_ppec()->plugin_url . 'assets/css/wc-gateway-ppec-frontend-cart.css' );
|
305 |
|
306 |
+
$is_cart = is_cart() && ! WC()->cart->is_empty() && 'yes' === $settings->cart_checkout_enabled;
|
307 |
$is_product = is_product() && 'yes' === $settings->checkout_on_single_product_enabled;
|
308 |
$is_checkout = is_checkout() && 'yes' === $settings->mark_enabled && ! wc_gateway_ppec()->checkout->has_active_session();
|
309 |
$page = $is_cart ? 'cart' : ( $is_product ? 'product' : ( $is_checkout ? 'checkout' : null ) );
|
333 |
'page' => $page,
|
334 |
'button_color' => $settings->button_color,
|
335 |
'button_shape' => $settings->button_shape,
|
336 |
+
'start_checkout_nonce' => $this->create_nonce( '_wc_ppec_start_checkout_nonce' ),
|
337 |
'start_checkout_url' => WC_AJAX::get_endpoint( 'wc_ppec_start_checkout' ),
|
338 |
);
|
339 |
|
364 |
wp_enqueue_script( 'wc-gateway-ppec-generate-cart', wc_gateway_ppec()->plugin_url . 'assets/js/wc-gateway-ppec-generate-cart.js', array( 'jquery' ), wc_gateway_ppec()->version, true );
|
365 |
wp_localize_script( 'wc-gateway-ppec-generate-cart', 'wc_ppec_generate_cart_context',
|
366 |
array(
|
367 |
+
'generate_cart_nonce' => $this->create_nonce( '_wc_ppec_generate_cart_nonce' ),
|
368 |
'ajaxurl' => WC_AJAX::get_endpoint( 'wc_ppec_generate_cart' ),
|
369 |
)
|
370 |
);
|
371 |
}
|
372 |
}
|
373 |
|
374 |
+
/**
|
375 |
+
* Ensures a session is active, so that nonce is not invalidated by new session created on AJAX POST request.
|
376 |
+
*/
|
377 |
+
protected function create_nonce( $action ) {
|
378 |
+
if ( ! WC()->session->has_session() ) {
|
379 |
+
WC()->session->set_customer_session_cookie( true );
|
380 |
+
}
|
381 |
+
|
382 |
+
return wp_create_nonce( $action );
|
383 |
+
}
|
384 |
+
|
385 |
/**
|
386 |
* @deprecated
|
387 |
*/
|
includes/class-wc-gateway-ppec-checkout-handler.php
CHANGED
@@ -416,7 +416,7 @@ class WC_Gateway_PPEC_Checkout_Handler {
|
|
416 |
}
|
417 |
|
418 |
/**
|
419 |
-
* Checks data is correctly set when returning from PayPal
|
420 |
*/
|
421 |
public function maybe_return_from_paypal() {
|
422 |
if ( empty( $_GET['woo-paypal-return'] ) || empty( $_GET['token'] ) || empty( $_GET['PayerID'] ) ) {
|
416 |
}
|
417 |
|
418 |
/**
|
419 |
+
* Checks data is correctly set when returning from PayPal Checkout
|
420 |
*/
|
421 |
public function maybe_return_from_paypal() {
|
422 |
if ( empty( $_GET['woo-paypal-return'] ) || empty( $_GET['token'] ) || empty( $_GET['PayerID'] ) ) {
|
includes/class-wc-gateway-ppec-gateway-loader.php
CHANGED
@@ -22,6 +22,7 @@ class WC_Gateway_PPEC_Gateway_Loader {
|
|
22 |
require_once( $includes_path . 'class-wc-gateway-ppec-with-paypal-credit.php' );
|
23 |
require_once( $includes_path . 'class-wc-gateway-ppec-with-paypal-addons.php' );
|
24 |
require_once( $includes_path . 'class-wc-gateway-ppec-with-spb.php' );
|
|
|
25 |
|
26 |
add_filter( 'woocommerce_payment_gateways', array( $this, 'payment_gateways' ) );
|
27 |
}
|
@@ -37,7 +38,11 @@ class WC_Gateway_PPEC_Gateway_Loader {
|
|
37 |
$settings = wc_gateway_ppec()->settings;
|
38 |
|
39 |
if ( 'yes' === $settings->use_spb ) {
|
40 |
-
$
|
|
|
|
|
|
|
|
|
41 |
return $methods;
|
42 |
}
|
43 |
|
22 |
require_once( $includes_path . 'class-wc-gateway-ppec-with-paypal-credit.php' );
|
23 |
require_once( $includes_path . 'class-wc-gateway-ppec-with-paypal-addons.php' );
|
24 |
require_once( $includes_path . 'class-wc-gateway-ppec-with-spb.php' );
|
25 |
+
require_once( $includes_path . 'class-wc-gateway-ppec-with-spb-addons.php' );
|
26 |
|
27 |
add_filter( 'woocommerce_payment_gateways', array( $this, 'payment_gateways' ) );
|
28 |
}
|
38 |
$settings = wc_gateway_ppec()->settings;
|
39 |
|
40 |
if ( 'yes' === $settings->use_spb ) {
|
41 |
+
if ( $this->can_use_addons() ) {
|
42 |
+
$methods[] = 'WC_Gateway_PPEC_With_SPB_Addons';
|
43 |
+
} else {
|
44 |
+
$methods[] = 'WC_Gateway_PPEC_With_SPB';
|
45 |
+
}
|
46 |
return $methods;
|
47 |
}
|
48 |
|
includes/class-wc-gateway-ppec-plugin.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* PayPal
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
@@ -153,7 +153,7 @@ class WC_Gateway_PPEC_Plugin {
|
|
153 |
public function bootstrap() {
|
154 |
try {
|
155 |
if ( $this->_bootstrapped ) {
|
156 |
-
throw new Exception( __( '%s in WooCommerce Gateway PayPal
|
157 |
}
|
158 |
|
159 |
$this->_check_dependencies();
|
@@ -237,7 +237,7 @@ class WC_Gateway_PPEC_Plugin {
|
|
237 |
|
238 |
if ( 'yes' !== get_option( 'wc_gateway_ppec_spb_notice_dismissed', 'no' ) ) {
|
239 |
$setting_link = $this->get_admin_setting_link();
|
240 |
-
$message = sprintf( __( '<p>PayPal
|
241 |
?>
|
242 |
<div class="notice notice-warning is-dismissible ppec-dismiss-spb-notice">
|
243 |
<?php echo wp_kses( $message, array( 'a' => array( 'href' => array() ), 'strong' => array(), 'p' => array() ) ); ?>
|
@@ -290,18 +290,18 @@ class WC_Gateway_PPEC_Plugin {
|
|
290 |
*/
|
291 |
protected function _check_dependencies() {
|
292 |
if ( ! function_exists( 'WC' ) ) {
|
293 |
-
throw new Exception( __( 'WooCommerce Gateway PayPal
|
294 |
}
|
295 |
|
296 |
if ( version_compare( WC()->version, '2.5', '<' ) ) {
|
297 |
-
throw new Exception( __( 'WooCommerce Gateway PayPal
|
298 |
}
|
299 |
|
300 |
if ( ! function_exists( 'curl_init' ) ) {
|
301 |
-
throw new Exception( __( 'WooCommerce Gateway PayPal
|
302 |
}
|
303 |
|
304 |
-
$openssl_warning = __( 'WooCommerce Gateway PayPal
|
305 |
if ( ! defined( 'OPENSSL_VERSION_TEXT' ) ) {
|
306 |
throw new Exception( $openssl_warning, self::DEPENDENCIES_UNSATISFIED );
|
307 |
}
|
@@ -328,7 +328,7 @@ class WC_Gateway_PPEC_Plugin {
|
|
328 |
$credential = $this->settings->get_active_api_credentials();
|
329 |
if ( ! is_a( $credential, 'WC_Gateway_PPEC_Client_Credential' ) || '' === $credential->get_username() ) {
|
330 |
$setting_link = $this->get_admin_setting_link();
|
331 |
-
throw new Exception( sprintf( __( 'PayPal
|
332 |
}
|
333 |
}
|
334 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* PayPal Checkout Plugin.
|
4 |
*/
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
153 |
public function bootstrap() {
|
154 |
try {
|
155 |
if ( $this->_bootstrapped ) {
|
156 |
+
throw new Exception( __( '%s in WooCommerce Gateway PayPal Checkout plugin can only be called once', 'woocommerce-gateway-paypal-express-checkout' ), self::ALREADY_BOOTSTRAPED );
|
157 |
}
|
158 |
|
159 |
$this->_check_dependencies();
|
237 |
|
238 |
if ( 'yes' !== get_option( 'wc_gateway_ppec_spb_notice_dismissed', 'no' ) ) {
|
239 |
$setting_link = $this->get_admin_setting_link();
|
240 |
+
$message = sprintf( __( '<p>PayPal Checkout with new <strong>Smart Payment Buttons™</strong> gives your customers the power to pay the way they want without leaving your site.</p><p>The <strong>existing buttons will be deprecated and removed</strong> in future releases. Upgrade to Smart Payment Buttons in the <a href="%s">PayPal Checkout settings</a>.</p>', 'woocommerce-gateway-paypal-express-checkout' ), esc_url( $setting_link ) );
|
241 |
?>
|
242 |
<div class="notice notice-warning is-dismissible ppec-dismiss-spb-notice">
|
243 |
<?php echo wp_kses( $message, array( 'a' => array( 'href' => array() ), 'strong' => array(), 'p' => array() ) ); ?>
|
290 |
*/
|
291 |
protected function _check_dependencies() {
|
292 |
if ( ! function_exists( 'WC' ) ) {
|
293 |
+
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires WooCommerce to be activated', 'woocommerce-gateway-paypal-express-checkout' ), self::DEPENDENCIES_UNSATISFIED );
|
294 |
}
|
295 |
|
296 |
if ( version_compare( WC()->version, '2.5', '<' ) ) {
|
297 |
+
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires WooCommerce version 2.5 or greater', 'woocommerce-gateway-paypal-express-checkout' ), self::DEPENDENCIES_UNSATISFIED );
|
298 |
}
|
299 |
|
300 |
if ( ! function_exists( 'curl_init' ) ) {
|
301 |
+
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires cURL to be installed on your server', 'woocommerce-gateway-paypal-express-checkout' ), self::DEPENDENCIES_UNSATISFIED );
|
302 |
}
|
303 |
|
304 |
+
$openssl_warning = __( 'WooCommerce Gateway PayPal Checkout requires OpenSSL >= 1.0.1 to be installed on your server', 'woocommerce-gateway-paypal-express-checkout' );
|
305 |
if ( ! defined( 'OPENSSL_VERSION_TEXT' ) ) {
|
306 |
throw new Exception( $openssl_warning, self::DEPENDENCIES_UNSATISFIED );
|
307 |
}
|
328 |
$credential = $this->settings->get_active_api_credentials();
|
329 |
if ( ! is_a( $credential, 'WC_Gateway_PPEC_Client_Credential' ) || '' === $credential->get_username() ) {
|
330 |
$setting_link = $this->get_admin_setting_link();
|
331 |
+
throw new Exception( sprintf( __( 'PayPal Checkout is almost ready. To get started, <a href="%s">connect your PayPal account</a>.', 'woocommerce-gateway-paypal-express-checkout' ), esc_url( $setting_link ) ), self::NOT_CONNECTED );
|
332 |
}
|
333 |
}
|
334 |
|
includes/class-wc-gateway-ppec-privacy.php
CHANGED
@@ -9,7 +9,7 @@ class WC_Gateway_PPEC_Privacy extends WC_Abstract_Privacy {
|
|
9 |
*
|
10 |
*/
|
11 |
public function __construct() {
|
12 |
-
parent::__construct( __( 'PayPal
|
13 |
|
14 |
$this->add_exporter( 'woocommerce-gateway-paypal-express-checkout-order-data', __( 'WooCommerce PPEC Order Data', 'woocommerce-gateway-paypal-express-checkout' ), array( $this, 'order_data_exporter' ) );
|
15 |
if ( class_exists( 'WC_Subscriptions' ) ) {
|
@@ -143,11 +143,11 @@ class WC_Gateway_PPEC_Privacy extends WC_Abstract_Privacy {
|
|
143 |
'data' => array(
|
144 |
array(
|
145 |
'name' => __( 'PPEC Refundable transaction data', 'woocommerce-gateway-paypal-express-checkout' ),
|
146 |
-
'value' => json_encode( get_post_meta( $
|
147 |
),
|
148 |
array(
|
149 |
'name' => __( 'PPEC Billing agreement id', 'woocommerce-gateway-paypal-express-checkout' ),
|
150 |
-
'value' => get_post_meta( $
|
151 |
),
|
152 |
),
|
153 |
);
|
@@ -242,7 +242,7 @@ class WC_Gateway_PPEC_Privacy extends WC_Abstract_Privacy {
|
|
242 |
delete_post_meta( $subscription_id, '_ppec_billing_agreement_id' );
|
243 |
delete_post_meta( $subscription_id, '_paypal_status' );
|
244 |
|
245 |
-
return array( true, false, array( __( 'PayPal
|
246 |
}
|
247 |
|
248 |
/**
|
@@ -265,7 +265,7 @@ class WC_Gateway_PPEC_Privacy extends WC_Abstract_Privacy {
|
|
265 |
delete_post_meta( $order_id, '_ppec_billing_agreement_id' );
|
266 |
delete_post_meta( $order_id, '_paypal_status' );
|
267 |
|
268 |
-
return array( true, false, array( __( 'PayPal
|
269 |
}
|
270 |
}
|
271 |
|
9 |
*
|
10 |
*/
|
11 |
public function __construct() {
|
12 |
+
parent::__construct( __( 'PayPal Checkout', 'woocommerce-gateway-paypal-express-checkout' ) );
|
13 |
|
14 |
$this->add_exporter( 'woocommerce-gateway-paypal-express-checkout-order-data', __( 'WooCommerce PPEC Order Data', 'woocommerce-gateway-paypal-express-checkout' ), array( $this, 'order_data_exporter' ) );
|
15 |
if ( class_exists( 'WC_Subscriptions' ) ) {
|
143 |
'data' => array(
|
144 |
array(
|
145 |
'name' => __( 'PPEC Refundable transaction data', 'woocommerce-gateway-paypal-express-checkout' ),
|
146 |
+
'value' => json_encode( get_post_meta( $subscription->get_id(), '_woo_pp_txnData', true ) ),
|
147 |
),
|
148 |
array(
|
149 |
'name' => __( 'PPEC Billing agreement id', 'woocommerce-gateway-paypal-express-checkout' ),
|
150 |
+
'value' => get_post_meta( $subscription->get_id(), '_ppec_billing_agreement_id', true ),
|
151 |
),
|
152 |
),
|
153 |
);
|
242 |
delete_post_meta( $subscription_id, '_ppec_billing_agreement_id' );
|
243 |
delete_post_meta( $subscription_id, '_paypal_status' );
|
244 |
|
245 |
+
return array( true, false, array( __( 'PayPal Checkout Subscriptions Data Erased.', 'woocommerce-gateway-paypal-express-checkout' ) ) );
|
246 |
}
|
247 |
|
248 |
/**
|
265 |
delete_post_meta( $order_id, '_ppec_billing_agreement_id' );
|
266 |
delete_post_meta( $order_id, '_paypal_status' );
|
267 |
|
268 |
+
return array( true, false, array( __( 'PayPal Checkout Order Data Erased.', 'woocommerce-gateway-paypal-express-checkout' ) ) );
|
269 |
}
|
270 |
}
|
271 |
|
includes/class-wc-gateway-ppec-session-data.php
CHANGED
@@ -5,7 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
5 |
}
|
6 |
|
7 |
/**
|
8 |
-
* PayPal
|
9 |
*/
|
10 |
class WC_Gateway_PPEC_Session_Data {
|
11 |
|
5 |
}
|
6 |
|
7 |
/**
|
8 |
+
* PayPal Checkout session wrapper.
|
9 |
*/
|
10 |
class WC_Gateway_PPEC_Session_Data {
|
11 |
|
includes/class-wc-gateway-ppec-settings.php
CHANGED
@@ -306,7 +306,7 @@ class WC_Gateway_PPEC_Settings {
|
|
306 |
if ( ! in_array( $locale, $this->_supported_locales ) ) {
|
307 |
$locale = 'en_US';
|
308 |
}
|
309 |
-
return $locale;
|
310 |
}
|
311 |
|
312 |
/**
|
306 |
if ( ! in_array( $locale, $this->_supported_locales ) ) {
|
307 |
$locale = 'en_US';
|
308 |
}
|
309 |
+
return apply_filters( 'woocommerce_paypal_express_checkout_paypal_locale', $locale );
|
310 |
}
|
311 |
|
312 |
/**
|
includes/class-wc-gateway-ppec-with-spb-addons.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Duplicate of implementation in WC_Gateway_PPEC_With_SPB.
|
9 |
+
*/
|
10 |
+
class WC_Gateway_PPEC_With_SPB_Addons extends WC_Gateway_PPEC_With_PayPal_Addons {
|
11 |
+
public function __construct() {
|
12 |
+
parent::__construct();
|
13 |
+
|
14 |
+
add_action( 'woocommerce_review_order_after_submit', array( $this, 'display_paypal_button' ) );
|
15 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'payment_scripts' ) );
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Display PayPal button on the checkout page order review.
|
20 |
+
*/
|
21 |
+
public function display_paypal_button() {
|
22 |
+
?>
|
23 |
+
<div id="woo_pp_ec_button_checkout"></div>
|
24 |
+
<?php
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Output script for conditionally showing Smart Payment Buttons on regular checkout.
|
29 |
+
*
|
30 |
+
* @since 1.6.0
|
31 |
+
*/
|
32 |
+
public function payment_scripts() {
|
33 |
+
if ( ! wc_gateway_ppec()->checkout->has_active_session() ) {
|
34 |
+
wp_enqueue_script( 'wc-gateway-ppec-order-review', wc_gateway_ppec()->plugin_url . 'assets/js/wc-gateway-ppec-order-review.js', array( 'jquery' ), wc_gateway_ppec()->version, true );
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Save data necessary for authorizing payment to session, in order to
|
40 |
+
* go ahead with processing payment and bypass redirecting to PayPal.
|
41 |
+
*
|
42 |
+
* @param int $order_id Order ID
|
43 |
+
*
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
public function process_payment( $order_id ) {
|
47 |
+
if ( isset( $_POST['payerID'] ) && isset( $_POST['paymentToken'] ) ) {
|
48 |
+
$session = WC()->session->get( 'paypal' );
|
49 |
+
|
50 |
+
$session->checkout_completed = true;
|
51 |
+
$session->payer_id = $_POST['payerID'];
|
52 |
+
$session->token = $_POST['paymentToken'];
|
53 |
+
|
54 |
+
WC()->session->set( 'paypal', $session );
|
55 |
+
}
|
56 |
+
|
57 |
+
return parent::process_payment( $order_id );
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
includes/class-wc-gateway-ppec-with-spb.php
CHANGED
@@ -4,11 +4,11 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly
|
5 |
}
|
6 |
|
7 |
-
|
|
|
|
|
|
|
8 |
public function __construct() {
|
9 |
-
$this->id = 'ppec_paypal';
|
10 |
-
$this->icon = 'https://www.paypalobjects.com/webstatic/en_US/i/buttons/pp-acceptance-small.png';
|
11 |
-
|
12 |
parent::__construct();
|
13 |
|
14 |
add_action( 'woocommerce_review_order_after_submit', array( $this, 'display_paypal_button' ) );
|
4 |
exit; // Exit if accessed directly
|
5 |
}
|
6 |
|
7 |
+
/**
|
8 |
+
* Implementation is duplicated in WC_Gateway_PPEC_With_SPB.
|
9 |
+
*/
|
10 |
+
class WC_Gateway_PPEC_With_SPB extends WC_Gateway_PPEC_With_PayPal {
|
11 |
public function __construct() {
|
|
|
|
|
|
|
12 |
parent::__construct();
|
13 |
|
14 |
add_action( 'woocommerce_review_order_after_submit', array( $this, 'display_paypal_button' ) );
|
includes/settings/settings-ppec.php
CHANGED
@@ -48,7 +48,7 @@ if ( ! wc_gateway_ppec_is_credit_supported() ) {
|
|
48 |
$credit_enabled_label .= '<p><em>' . __( 'This option is disabled. Currently PayPal Credit only available for U.S. merchants using USD currency.', 'woocommerce-gateway-paypal-express-checkout' ) . '</em></p>';
|
49 |
}
|
50 |
|
51 |
-
$credit_enabled_description = __( 'This enables PayPal Credit, which displays a PayPal Credit button next to the
|
52 |
|
53 |
wc_enqueue_js( "
|
54 |
jQuery( function( $ ) {
|
@@ -254,8 +254,8 @@ $settings = array(
|
|
254 |
'enabled' => array(
|
255 |
'title' => __( 'Enable/Disable', 'woocommerce-gateway-paypal-express-checkout' ),
|
256 |
'type' => 'checkbox',
|
257 |
-
'label' => __( 'Enable PayPal
|
258 |
-
'description' => __( 'This enables PayPal
|
259 |
'desc_tip' => true,
|
260 |
'default' => 'yes',
|
261 |
),
|
@@ -380,7 +380,7 @@ $settings = array(
|
|
380 |
'paypal_hosted_settings' => array(
|
381 |
'title' => __( 'PayPal-hosted Checkout Settings', 'woocommerce-gateway-paypal-express-checkout' ),
|
382 |
'type' => 'title',
|
383 |
-
'description' => __( 'Customize the appearance of
|
384 |
),
|
385 |
'brand_name' => array(
|
386 |
'title' => __( 'Brand Name', 'woocommerce-gateway-paypal-express-checkout' ),
|
@@ -496,14 +496,14 @@ $settings = array(
|
|
496 |
'button_settings' => array(
|
497 |
'title' => __( 'Button Settings', 'woocommerce-gateway-paypal-express-checkout' ),
|
498 |
'type' => 'title',
|
499 |
-
'description' => __( 'Customize the appearance of
|
500 |
),
|
501 |
'use_spb' => array(
|
502 |
'title' => __( 'Smart Payment Buttons', 'woocommerce-gateway-paypal-express-checkout' ),
|
503 |
'type' => 'checkbox',
|
504 |
'default' => $this->get_option( 'button_size' ) ? 'no' : 'yes', // A 'button_size' value having been set indicates that settings have been initialized before, requiring merchant opt-in to SPB.
|
505 |
'label' => __( 'Use Smart Payment Buttons', 'woocommerce-gateway-paypal-express-checkout' ),
|
506 |
-
'description' => sprintf( __( '
|
507 |
),
|
508 |
'button_color' => array(
|
509 |
'title' => __( 'Button Color', 'woocommerce-gateway-paypal-express-checkout' ),
|
@@ -582,9 +582,9 @@ $per_context_settings = array(
|
|
582 |
'label' => $credit_enabled_label,
|
583 |
'disabled' => ! wc_gateway_ppec_is_credit_supported(),
|
584 |
'class' => 'woocommerce_ppec_paypal_horizontal',
|
585 |
-
'default' => '
|
586 |
'desc_tip' => true,
|
587 |
-
'description' =>
|
588 |
),
|
589 |
);
|
590 |
|
@@ -599,8 +599,8 @@ $settings['cart_checkout_enabled'] = array(
|
|
599 |
'title' => __( 'Checkout on cart page', 'woocommerce-gateway-paypal-express-checkout' ),
|
600 |
'type' => 'checkbox',
|
601 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
602 |
-
'label' => __( 'Enable PayPal
|
603 |
-
'description' => __( 'This shows or hides the PayPal
|
604 |
'desc_tip' => true,
|
605 |
'default' => 'yes',
|
606 |
);
|
@@ -642,7 +642,7 @@ $settings['checkout_on_single_product_enabled'] = array(
|
|
642 |
'label' => __( 'Checkout on Single Product', 'woocommerce-gateway-paypal-express-checkout' ),
|
643 |
'default' => 'yes',
|
644 |
'desc_tip' => true,
|
645 |
-
'description' => __( 'Enable
|
646 |
);
|
647 |
$settings['single_product_settings_toggle'] = array(
|
648 |
'title' => __( 'Configure Settings', 'woocommerce-gateway-paypal-express-checkout' ),
|
@@ -672,7 +672,7 @@ $settings['mark_enabled'] = array(
|
|
672 |
'type' => 'checkbox',
|
673 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
674 |
'label' => __( 'Enable the PayPal Mark on regular checkout', 'woocommerce-gateway-paypal-express-checkout' ),
|
675 |
-
'description' => __( 'This enables the PayPal mark, which can be shown on regular WooCommerce checkout to use PayPal
|
676 |
'desc_tip' => true,
|
677 |
'default' => 'yes',
|
678 |
);
|
48 |
$credit_enabled_label .= '<p><em>' . __( 'This option is disabled. Currently PayPal Credit only available for U.S. merchants using USD currency.', 'woocommerce-gateway-paypal-express-checkout' ) . '</em></p>';
|
49 |
}
|
50 |
|
51 |
+
$credit_enabled_description = __( 'This enables PayPal Credit, which displays a PayPal Credit button next to the primary PayPal Checkout button. PayPal Checkout lets you give customers access to financing through PayPal Credit® - at no additional cost to you. You get paid up front, even though customers have more time to pay. A pre-integrated payment button shows up next to the PayPal Button, and lets customers pay quickly with PayPal Credit®. (Should be unchecked for stores involved in Real Money Gaming.)', 'woocommerce-gateway-paypal-express-checkout' );
|
52 |
|
53 |
wc_enqueue_js( "
|
54 |
jQuery( function( $ ) {
|
254 |
'enabled' => array(
|
255 |
'title' => __( 'Enable/Disable', 'woocommerce-gateway-paypal-express-checkout' ),
|
256 |
'type' => 'checkbox',
|
257 |
+
'label' => __( 'Enable PayPal Checkout', 'woocommerce-gateway-paypal-express-checkout' ),
|
258 |
+
'description' => __( 'This enables PayPal Checkout which allows customers to checkout directly via PayPal from your cart page.', 'woocommerce-gateway-paypal-express-checkout' ),
|
259 |
'desc_tip' => true,
|
260 |
'default' => 'yes',
|
261 |
),
|
380 |
'paypal_hosted_settings' => array(
|
381 |
'title' => __( 'PayPal-hosted Checkout Settings', 'woocommerce-gateway-paypal-express-checkout' ),
|
382 |
'type' => 'title',
|
383 |
+
'description' => __( 'Customize the appearance of PayPal Checkout on the PayPal side.', 'woocommerce-gateway-paypal-express-checkout' ),
|
384 |
),
|
385 |
'brand_name' => array(
|
386 |
'title' => __( 'Brand Name', 'woocommerce-gateway-paypal-express-checkout' ),
|
496 |
'button_settings' => array(
|
497 |
'title' => __( 'Button Settings', 'woocommerce-gateway-paypal-express-checkout' ),
|
498 |
'type' => 'title',
|
499 |
+
'description' => __( 'Customize the appearance of PayPal Checkout on your site.', 'woocommerce-gateway-paypal-express-checkout' ),
|
500 |
),
|
501 |
'use_spb' => array(
|
502 |
'title' => __( 'Smart Payment Buttons', 'woocommerce-gateway-paypal-express-checkout' ),
|
503 |
'type' => 'checkbox',
|
504 |
'default' => $this->get_option( 'button_size' ) ? 'no' : 'yes', // A 'button_size' value having been set indicates that settings have been initialized before, requiring merchant opt-in to SPB.
|
505 |
'label' => __( 'Use Smart Payment Buttons', 'woocommerce-gateway-paypal-express-checkout' ),
|
506 |
+
'description' => sprintf( __( 'PayPal Checkout\'s Smart Payment Buttons provide a variety of button customization options, such as color, language, shape, and multiple button layout. <a href="%s">Learn more about Smart Payment Buttons</a>.', 'woocommerce-gateway-paypal-express-checkout' ), 'https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/#smart-payment-buttons' ),
|
507 |
),
|
508 |
'button_color' => array(
|
509 |
'title' => __( 'Button Color', 'woocommerce-gateway-paypal-express-checkout' ),
|
582 |
'label' => $credit_enabled_label,
|
583 |
'disabled' => ! wc_gateway_ppec_is_credit_supported(),
|
584 |
'class' => 'woocommerce_ppec_paypal_horizontal',
|
585 |
+
'default' => 'yes',
|
586 |
'desc_tip' => true,
|
587 |
+
'description' => $credit_enabled_description,
|
588 |
),
|
589 |
);
|
590 |
|
599 |
'title' => __( 'Checkout on cart page', 'woocommerce-gateway-paypal-express-checkout' ),
|
600 |
'type' => 'checkbox',
|
601 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
602 |
+
'label' => __( 'Enable PayPal Checkout on the cart page', 'woocommerce-gateway-paypal-express-checkout' ),
|
603 |
+
'description' => __( 'This shows or hides the PayPal Checkout button on the cart page.', 'woocommerce-gateway-paypal-express-checkout' ),
|
604 |
'desc_tip' => true,
|
605 |
'default' => 'yes',
|
606 |
);
|
642 |
'label' => __( 'Checkout on Single Product', 'woocommerce-gateway-paypal-express-checkout' ),
|
643 |
'default' => 'yes',
|
644 |
'desc_tip' => true,
|
645 |
+
'description' => __( 'Enable PayPal Checkout on Single Product view.', 'woocommerce-gateway-paypal-express-checkout' ),
|
646 |
);
|
647 |
$settings['single_product_settings_toggle'] = array(
|
648 |
'title' => __( 'Configure Settings', 'woocommerce-gateway-paypal-express-checkout' ),
|
672 |
'type' => 'checkbox',
|
673 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
674 |
'label' => __( 'Enable the PayPal Mark on regular checkout', 'woocommerce-gateway-paypal-express-checkout' ),
|
675 |
+
'description' => __( 'This enables the PayPal mark, which can be shown on regular WooCommerce checkout to use PayPal Checkout like a regular WooCommerce gateway.', 'woocommerce-gateway-paypal-express-checkout' ),
|
676 |
'desc_tip' => true,
|
677 |
'default' => 'yes',
|
678 |
);
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
=== WooCommerce PayPal
|
2 |
-
Contributors: automattic, woothemes, akeda, dwainm, royho, allendav, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, fullysupportedphil, dsmithweb, corsonr, bor0, zandyring
|
3 |
Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9.6
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -11,9 +11,9 @@ Accept PayPal, Credit Cards and Debit Cards on your WooCommerce store.
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
This is a PayPal
|
15 |
|
16 |
-
PayPal
|
17 |
|
18 |
Also, with Integrated PayPal Setup (Easy Setup), connecting to PayPal is as simple as clicking a button - no complicated API keys to cut and paste.
|
19 |
|
@@ -27,7 +27,7 @@ Also, with Integrated PayPal Setup (Easy Setup), connecting to PayPal is as simp
|
|
27 |
|
28 |
Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
|
29 |
|
30 |
-
In the search field type "WooCommerce PayPal
|
31 |
|
32 |
= Manual installation =
|
33 |
|
@@ -44,7 +44,9 @@ If on the off-chance you do encounter issues with the shop/category pages after
|
|
44 |
|
45 |
= Does this plugin work with credit cards or just PayPal? =
|
46 |
|
47 |
-
This plugin supports payments using both credit and debit cards as well as PayPal.
|
|
|
|
|
48 |
|
49 |
= Does this support Checkout with PayPal from the cart view? =
|
50 |
|
@@ -73,15 +75,15 @@ New feature requests and bugs reports can be made in the plugin forum.
|
|
73 |
|
74 |
= How to remove 'Proceed to Checkout' button from cart page? =
|
75 |
|
76 |
-
If PayPal
|
77 |
|
78 |
https://gist.github.com/mikejolley/ad2ecc286c9ad6cefbb7065ba6dfef48
|
79 |
|
80 |
= Where can I contribute? =
|
81 |
|
82 |
-
The GitHub repository for PayPal
|
83 |
|
84 |
-
https://github.com/
|
85 |
|
86 |
Please use this to inform us about bugs, or make contributions via PRs.
|
87 |
|
@@ -99,6 +101,17 @@ Please use this to inform us about bugs, or make contributions via PRs.
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
= 1.6.0 - 2018-06-27 =
|
103 |
* Add - Smart Payment Buttons mode as alternative to directly embedded image links for all instances of PayPal button.
|
104 |
* Fix - Help tip alignment for image settings.
|
1 |
+
=== WooCommerce PayPal Checkout Payment Gateway ===
|
2 |
+
Contributors: automattic, woothemes, akeda, dwainm, royho, allendav, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, fullysupportedphil, dsmithweb, corsonr, bor0, zandyring, pauldechov
|
3 |
Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, store, sales, sell, shop, shopping, cart, checkout, configurable, paypal
|
4 |
Requires at least: 4.4
|
5 |
Tested up to: 4.9.6
|
6 |
+
Stable tag: 1.6.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
This is a PayPal Checkout Payment Gateway for WooCommerce.
|
15 |
|
16 |
+
PayPal Checkout allows you to securely sell your products and subscriptions online using In-Context Checkout to help you meet security requirements without causing your theme to suffer. In-Context Checkout uses a modal window, hosted on PayPal's servers, that overlays the checkout form and provides a secure means for your customers to enter their account information.
|
17 |
|
18 |
Also, with Integrated PayPal Setup (Easy Setup), connecting to PayPal is as simple as clicking a button - no complicated API keys to cut and paste.
|
19 |
|
27 |
|
28 |
Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New.
|
29 |
|
30 |
+
In the search field type "WooCommerce PayPal Checkout" and click Search Plugins. Once you’ve found our plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking “Install Now”.
|
31 |
|
32 |
= Manual installation =
|
33 |
|
44 |
|
45 |
= Does this plugin work with credit cards or just PayPal? =
|
46 |
|
47 |
+
This plugin supports payments using both credit and debit cards as well as PayPal. The new Smart Payment Buttons feature dynamically displays PayPal, Venmo (US Only), PayPal Credit, or other local payment options* in a single stack—without needing to leave the merchant's website.
|
48 |
+
|
49 |
+
*PayPal Checkout features may not be available in all countries.
|
50 |
|
51 |
= Does this support Checkout with PayPal from the cart view? =
|
52 |
|
75 |
|
76 |
= How to remove 'Proceed to Checkout' button from cart page? =
|
77 |
|
78 |
+
If PayPal Checkout is the only enabled payment gateway and you want to remove the 'Proceed to Checkout' button from the cart, you can use this snippet:
|
79 |
|
80 |
https://gist.github.com/mikejolley/ad2ecc286c9ad6cefbb7065ba6dfef48
|
81 |
|
82 |
= Where can I contribute? =
|
83 |
|
84 |
+
The GitHub repository for PayPal Checkout is here:
|
85 |
|
86 |
+
https://github.com/woocommerce/woocommerce-gateway-paypal-express-checkout
|
87 |
|
88 |
Please use this to inform us about bugs, or make contributions via PRs.
|
89 |
|
101 |
|
102 |
== Changelog ==
|
103 |
|
104 |
+
= 1.6.1 - 2018-07-04 =
|
105 |
+
* Fix - GDPR Fatal error exporting user data when they have PPEC subscriptions.
|
106 |
+
* Fix - PayPal Credit still being disabled by default.
|
107 |
+
* Update - Rename 'PayPal Express Checkout' to 'PayPal Checkout'.
|
108 |
+
* Fix - Missing PayPal branding in "Buy Now" Smart Payment Button.
|
109 |
+
* Fix - PHP warning when PayPal Credit not supported and no funding methods hidden.
|
110 |
+
* Fix - Smart Payment Buttons gateway not inheriting IPN and subscription handling.
|
111 |
+
* Fix - Single product Smart Payment Button failing without existing session.
|
112 |
+
* Fix - When cart is empty, JS error on cart page and mini-cart payment buttons showing.
|
113 |
+
* Add - Locale filter.
|
114 |
+
|
115 |
= 1.6.0 - 2018-06-27 =
|
116 |
* Add - Smart Payment Buttons mode as alternative to directly embedded image links for all instances of PayPal button.
|
117 |
* Fix - Help tip alignment for image settings.
|
woocommerce-gateway-paypal-express-checkout.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name: WooCommerce PayPal
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
|
5 |
-
* Description: A payment gateway for PayPal
|
6 |
-
* Version: 1.6.
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com
|
9 |
* Copyright: © 2018 WooCommerce / PayPal.
|
@@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
27 |
exit; // Exit if accessed directly
|
28 |
}
|
29 |
|
30 |
-
define( 'WC_GATEWAY_PPEC_VERSION', '1.6.
|
31 |
|
32 |
/**
|
33 |
* Return instance of WC_Gateway_PPEC_Plugin.
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Plugin Name: WooCommerce PayPal Checkout Gateway
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
|
5 |
+
* Description: A payment gateway for PayPal Checkout (https://www.paypal.com/us/webapps/mpp/paypal-checkout).
|
6 |
+
* Version: 1.6.1
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com
|
9 |
* Copyright: © 2018 WooCommerce / PayPal.
|
27 |
exit; // Exit if accessed directly
|
28 |
}
|
29 |
|
30 |
+
define( 'WC_GATEWAY_PPEC_VERSION', '1.6.1' );
|
31 |
|
32 |
/**
|
33 |
* Return instance of WC_Gateway_PPEC_Plugin.
|