Version Description
- 2021-06-28 =
- Fix - Prevent fatal error when a line item isn't a WC_Product instance. PR#872
- Fix - [WC Subscriptions] Update the shipping packages address using a dynamic key rather than assuming a 0 index. PR#871
- New - Allow hiding of funding methods MercadoPago and BLIK. PR#870
- Tweak - Make labels/descriptions more consistent on the settings screen. PR#771
- Tweak - Make WooCommerce 3.2.0 explicit. PR#868
- Dev - Add hooks to alter names and descriptions of line items sent to PayPal. PR#869
- Fix - Create session cookie only when needed. PR#793, PR#845.
- Tweak - Mark as compatible with latest WordPress and WooCommerce. PR#867
- Fix - Replace jQuery 3.x deprecated functions. PR#852
- Fix - Honor shape settings when rendering buttons for alternative funding sources. PR#844
- New - Add notice on plugins page to upgrade to PayPal Payments. PR#866
Download this release
Release Info
Developer | woothemes |
Plugin | WooCommerce PayPal Express Checkout Payment Gateway |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- assets/css/admin/ppec-upgrade-notice.css +45 -0
- assets/js/admin/ppec-upgrade-notice.js +50 -0
- assets/js/wc-gateway-ppec-frontend-in-context-checkout.js +3 -3
- assets/js/wc-gateway-ppec-generate-cart.js +1 -1
- assets/js/wc-gateway-ppec-settings.js +34 -34
- assets/js/wc-gateway-ppec-smart-payment-buttons.js +4 -3
- changelog.txt +13 -0
- includes/abstracts/abstract-wc-gateway-ppec.php +8 -2
- includes/class-wc-gateway-ppec-cart-handler.php +17 -3
- includes/class-wc-gateway-ppec-checkout-handler.php +9 -6
- includes/class-wc-gateway-ppec-client.php +7 -7
- includes/class-wc-gateway-ppec-plugin.php +24 -2
- includes/settings/settings-ppec.php +20 -21
- languages/woocommerce-gateway-paypal-express-checkout.pot +132 -133
- readme.txt +15 -2
- templates/paypal-payments-upgrade-notice.php +59 -0
- woocommerce-gateway-paypal-express-checkout.php +21 -5
assets/css/admin/ppec-upgrade-notice.css
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.plugins tr[data-slug=woocommerce-gateway-paypal-express-checkout] th, .plugins tr[data-slug=woocommerce-gateway-paypal-express-checkout] td {
|
2 |
+
box-shadow: none !important;
|
3 |
+
}
|
4 |
+
|
5 |
+
#ppec-migrate-notice .notice {
|
6 |
+
padding: 1px 0 20px 0;
|
7 |
+
}
|
8 |
+
#ppec-migrate-notice .ppec-notice-section {
|
9 |
+
padding: 0 20px;
|
10 |
+
}
|
11 |
+
#ppec-migrate-notice .ppec-notice-title {
|
12 |
+
border-bottom: 1px solid #FFB900;
|
13 |
+
}
|
14 |
+
#ppec-migrate-notice .ppec-notice-title p {
|
15 |
+
line-height: 30px;
|
16 |
+
}
|
17 |
+
#ppec-migrate-notice .ppec-notice-title p:before {
|
18 |
+
vertical-align: middle;
|
19 |
+
}
|
20 |
+
#ppec-migrate-notice .ppec-notice-content p:first-of-type {
|
21 |
+
margin-top: 20px;
|
22 |
+
}
|
23 |
+
#ppec-migrate-notice .ppec-notice-content p:before {
|
24 |
+
display: none;
|
25 |
+
}
|
26 |
+
#ppec-migrate-notice .ppec-notice-content ul {
|
27 |
+
list-style-type: disc;
|
28 |
+
margin-left: 30px;
|
29 |
+
}
|
30 |
+
#ppec-migrate-notice .ppec-notice-buttons a {
|
31 |
+
text-decoration: none;
|
32 |
+
line-height: 34px;
|
33 |
+
margin-right: 16px;
|
34 |
+
}
|
35 |
+
#ppec-migrate-notice .ppec-notice-buttons a:last-of-type {
|
36 |
+
margin-right: 0;
|
37 |
+
}
|
38 |
+
#ppec-migrate-notice .ppec-notice-buttons a:before {
|
39 |
+
vertical-align: middle;
|
40 |
+
margin: -2.5px 5px 0 0;
|
41 |
+
}
|
42 |
+
#ppec-migrate-notice .ppec-notice-buttons a.updating-message:before {
|
43 |
+
-webkit-animation: rotation 2s infinite linear;
|
44 |
+
animation: rotation 2s infinite linear;
|
45 |
+
}
|
assets/js/admin/ppec-upgrade-notice.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function ( $, window, document ) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
// Check whether PayPal Payments is installed.
|
5 |
+
let is_paypal_payments_installed = false,
|
6 |
+
is_paypal_payments_active = false;
|
7 |
+
|
8 |
+
const targetElement = $( 'tr[data-slug="woocommerce-paypal-payments"]' );
|
9 |
+
if ( targetElement.length ) {
|
10 |
+
is_paypal_payments_installed = true;
|
11 |
+
|
12 |
+
if ( targetElement.hasClass( 'active' ) ) {
|
13 |
+
is_paypal_payments_active = true;
|
14 |
+
}
|
15 |
+
|
16 |
+
// Dynamically update plugin activation link to handle plugin folder renames.
|
17 |
+
let activation_url = $( targetElement ).find( 'span.activate a' ).attr( 'href' );
|
18 |
+
$( 'a#ppec-activate-paypal-payments' ).attr( 'href', activation_url );
|
19 |
+
}
|
20 |
+
|
21 |
+
// Hide notice/buttons conditionally.
|
22 |
+
if ( is_paypal_payments_installed && is_paypal_payments_active ) {
|
23 |
+
$( 'tr#ppec-migrate-notice' ).hide();
|
24 |
+
} else if ( is_paypal_payments_installed ) {
|
25 |
+
$( 'a#ppec-install-paypal-payments' ).hide();
|
26 |
+
} else {
|
27 |
+
$( 'a#ppec-activate-paypal-payments' ).hide();
|
28 |
+
}
|
29 |
+
|
30 |
+
// Display buttons area
|
31 |
+
$( '#ppec-migrate-notice .ppec-notice-buttons' ).removeClass( 'hidden' );
|
32 |
+
|
33 |
+
// Handle delete event for PayPal Payments.
|
34 |
+
$( document ).on( 'wp-plugin-delete-success', function( event, response ) {
|
35 |
+
if ( is_paypal_payments_installed && 'woocommerce-paypal-payments' === response.slug ) {
|
36 |
+
$( 'a#ppec-activate-paypal-payments' ).hide();
|
37 |
+
$( 'a#ppec-install-paypal-payments' ).show();
|
38 |
+
}
|
39 |
+
} );
|
40 |
+
|
41 |
+
// Change button text when install link is clicked.
|
42 |
+
$( document ).on( 'click', '#ppec-install-paypal-payments', function( e ) {
|
43 |
+
e.preventDefault();
|
44 |
+
$( this ).addClass( 'updating-message' ).text( 'Installing...' );
|
45 |
+
const install_link = $( this ).attr('href');
|
46 |
+
setTimeout( function(){
|
47 |
+
window.location = install_link;
|
48 |
+
}, 100 );
|
49 |
+
});
|
50 |
+
})( jQuery, window, document );
|
assets/js/wc-gateway-ppec-frontend-in-context-checkout.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
|
4 |
var $wc_ppec = {
|
5 |
init: function() {
|
6 |
-
window.paypalCheckoutReady = function() {
|
7 |
paypal.checkout.setup(
|
8 |
wc_ppec_context.payer_id,
|
9 |
{
|
@@ -19,7 +19,7 @@
|
|
19 |
|
20 |
var costs_updated = false;
|
21 |
|
22 |
-
$( '#woo_pp_ec_button' ).
|
23 |
if ( costs_updated ) {
|
24 |
costs_updated = false;
|
25 |
|
@@ -40,7 +40,7 @@
|
|
40 |
url: wc_ppec_context.ajaxurl,
|
41 |
success: function( response ) {
|
42 |
costs_updated = true;
|
43 |
-
$( '#woo_pp_ec_button' ).click
|
44 |
}
|
45 |
} );
|
46 |
} );
|
3 |
|
4 |
var $wc_ppec = {
|
5 |
init: function() {
|
6 |
+
window.paypalCheckoutReady = function() {
|
7 |
paypal.checkout.setup(
|
8 |
wc_ppec_context.payer_id,
|
9 |
{
|
19 |
|
20 |
var costs_updated = false;
|
21 |
|
22 |
+
$( '#woo_pp_ec_button' ).on( 'click', function( event ) {
|
23 |
if ( costs_updated ) {
|
24 |
costs_updated = false;
|
25 |
|
40 |
url: wc_ppec_context.ajaxurl,
|
41 |
success: function( response ) {
|
42 |
costs_updated = true;
|
43 |
+
$( '#woo_pp_ec_button' ).trigger( 'click' );
|
44 |
}
|
45 |
} );
|
46 |
} );
|
assets/js/wc-gateway-ppec-generate-cart.js
CHANGED
@@ -33,7 +33,7 @@
|
|
33 |
} )
|
34 |
.on( 'mouseup', function( event ) {
|
35 |
event.stopImmediatePropagation();
|
36 |
-
form.find( ':submit' ).click
|
37 |
} )
|
38 |
.find( '> *' )
|
39 |
.css( 'pointer-events', 'none' );
|
33 |
} )
|
34 |
.on( 'mouseup', function( event ) {
|
35 |
event.stopImmediatePropagation();
|
36 |
+
form.find( ':submit' ).trigger( 'click' );
|
37 |
} )
|
38 |
.find( '> *' )
|
39 |
.css( 'pointer-events', 'none' );
|
assets/js/wc-gateway-ppec-settings.js
CHANGED
@@ -156,7 +156,7 @@
|
|
156 |
// If the enter key is pressed.
|
157 |
if ( 13 === event.which ) {
|
158 |
event.preventDefault();
|
159 |
-
$( ".woocommerce-save-button[name='save']" ).click
|
160 |
}
|
161 |
},
|
162 |
};
|
@@ -189,7 +189,7 @@
|
|
189 |
// as of v1.7.0 this option is enabled by default, but can be modified using a filter. Hiding the checkbox will let the settings page hide/show the correct settings depending on whether spb is enabled or disabled
|
190 |
$( '#woocommerce_ppec_paypal_use_spb' ).closest( 'tr' ).hide();
|
191 |
|
192 |
-
$( '#woocommerce_ppec_paypal_environment' ).change
|
193 |
$( ppec_sandbox_fields + ',' + ppec_live_fields ).closest( 'tr' ).hide();
|
194 |
|
195 |
if ( 'live' === $( this ).val() ) {
|
@@ -207,23 +207,23 @@
|
|
207 |
$( ppec_sandbox_fields ).closest( 'tr' ).show();
|
208 |
}
|
209 |
}
|
210 |
-
}).change
|
211 |
|
212 |
-
$( '#woocommerce_ppec_paypal_enabled' ).change
|
213 |
if ( $( this ).is( ':checked' ) ) {
|
214 |
$( ppec_mark_fields ).closest( 'tr' ).show();
|
215 |
} else {
|
216 |
$( ppec_mark_fields ).closest( 'tr' ).hide();
|
217 |
}
|
218 |
-
}).change
|
219 |
|
220 |
-
$( '#woocommerce_ppec_paypal_paymentaction' ).change
|
221 |
if ( 'sale' === $( this ).val() ) {
|
222 |
$( '#woocommerce_ppec_paypal_instant_payments' ).closest( 'tr' ).show();
|
223 |
} else {
|
224 |
$( '#woocommerce_ppec_paypal_instant_payments' ).closest( 'tr' ).hide();
|
225 |
}
|
226 |
-
}).change
|
227 |
|
228 |
if ( enable_toggle ) {
|
229 |
$( document ).off( 'click', '.ppec-toggle-settings' );
|
@@ -246,11 +246,11 @@
|
|
246 |
var refreshOnChange = [ 'button_layout', 'hide_funding_methods[]', 'credit_enabled', 'credit_message_enabled', 'credit_message_layout', 'credit_message_logo' ];
|
247 |
var selector = $.map( refreshOnChange, function( val ) { return '[name^="woocommerce_ppec_paypal_"][name$="' + val + '"]'; } ).join( ', ' );
|
248 |
|
249 |
-
$( selector ).
|
250 |
|
251 |
// Trigger this to configure initial state for cart settings.
|
252 |
-
$( '#woocommerce_ppec_paypal_credit_enabled' ).change
|
253 |
-
$( '#woocommerce_ppec_paypal_hide_funding_methods' ).change
|
254 |
},
|
255 |
|
256 |
refreshUI: function( event ) {
|
@@ -305,7 +305,7 @@
|
|
305 |
};
|
306 |
creditSettings.init();
|
307 |
|
308 |
-
$( '.woocommerce_ppec_paypal_button_layout' ).
|
309 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
310 |
return;
|
311 |
}
|
@@ -323,9 +323,9 @@
|
|
323 |
button_size.removeClass( 'enhanced' );
|
324 |
button_size_option.prop( 'disabled', isVertical );
|
325 |
$( document.body ).trigger( 'wc-enhanced-select-init' );
|
326 |
-
! button_size.val() && button_size.val( 'responsive' ).change
|
327 |
}
|
328 |
-
} ).change
|
329 |
|
330 |
// Hide default layout and size settings if they'll be overridden anyway.
|
331 |
function showHideDefaultButtonSettings() {
|
@@ -335,11 +335,11 @@
|
|
335 |
( $( '#woocommerce_ppec_paypal_mark_enabled' ).is( ':checked' ) && ! $( '#woocommerce_ppec_paypal_mark_settings_toggle' ).is( ':checked' ) );
|
336 |
|
337 |
$( '#woocommerce_ppec_paypal_button_layout, #woocommerce_ppec_paypal_button_size, #woocommerce_ppec_paypal_hide_funding_methods, #woocommerce_ppec_paypal_credit_enabled' ).closest( 'tr' ).toggle( display );
|
338 |
-
display && $( '#woocommerce_ppec_paypal_button_layout' ).change
|
339 |
}
|
340 |
|
341 |
// Toggle mini-cart section based on whether checkout on cart page is enabled
|
342 |
-
$( '#woocommerce_ppec_paypal_cart_checkout_enabled' ).
|
343 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
344 |
return;
|
345 |
}
|
@@ -351,19 +351,19 @@
|
|
351 |
.next( 'p' ) // Select description if present.
|
352 |
.addBack()
|
353 |
.toggle( checked );
|
354 |
-
checked && $( '#woocommerce_ppec_paypal_mini_cart_settings_toggle' ).change
|
355 |
showHideDefaultButtonSettings();
|
356 |
-
} ).change
|
357 |
|
358 |
-
$( '#woocommerce_ppec_paypal_mini_cart_settings_toggle' ).
|
359 |
// Only show settings specific to mini-cart if configured to override global settings.
|
360 |
var checked = $( event.target ).is( ':checked' );
|
361 |
$( '.woocommerce_ppec_paypal_mini_cart' ).closest( 'tr' ).toggle( checked );
|
362 |
-
checked && $( '#woocommerce_ppec_paypal_mini_cart_button_layout' ).change
|
363 |
showHideDefaultButtonSettings();
|
364 |
-
} ).change
|
365 |
|
366 |
-
$( '#woocommerce_ppec_paypal_checkout_on_single_product_enabled, #woocommerce_ppec_paypal_single_product_settings_toggle' ).
|
367 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
368 |
return;
|
369 |
}
|
@@ -378,13 +378,13 @@
|
|
378 |
} else {
|
379 |
// Show all settings in section.
|
380 |
$( '#woocommerce_ppec_paypal_single_product_settings_toggle, .woocommerce_ppec_paypal_single_product' ).closest( 'tr' ).show();
|
381 |
-
$( '#woocommerce_ppec_paypal_single_product_button_layout' ).change
|
382 |
-
$( '#woocommerce_ppec_paypal_single_product_credit_enabled' ).change
|
383 |
}
|
384 |
showHideDefaultButtonSettings();
|
385 |
-
} ).change
|
386 |
|
387 |
-
$( '#woocommerce_ppec_paypal_mark_enabled, #woocommerce_ppec_paypal_mark_settings_toggle' ).
|
388 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
389 |
return;
|
390 |
}
|
@@ -399,16 +399,16 @@
|
|
399 |
} else {
|
400 |
// Show all settings in section.
|
401 |
$( '#woocommerce_ppec_paypal_mark_settings_toggle, .woocommerce_ppec_paypal_mark' ).closest( 'tr' ).show();
|
402 |
-
$( '#woocommerce_ppec_paypal_mark_button_layout' ).change
|
403 |
-
$( '#woocommerce_ppec_paypal_mark_credit_enabled' ).change
|
404 |
}
|
405 |
showHideDefaultButtonSettings();
|
406 |
-
} ).change
|
407 |
|
408 |
// Make sure handlers are only attached once if script is loaded multiple times.
|
409 |
$( '#woocommerce_ppec_paypal_use_spb' ).off( 'change' );
|
410 |
|
411 |
-
$( '#woocommerce_ppec_paypal_use_spb' ).
|
412 |
var checked = $( event.target ).is( ':checked' );
|
413 |
|
414 |
// Show settings specific to Smart Payment Buttons only if enabled.
|
@@ -417,7 +417,7 @@
|
|
417 |
|
418 |
if ( checked ) {
|
419 |
// Trigger all logic that controls visibility of other settings.
|
420 |
-
$( '.woocommerce_ppec_paypal_visibility_toggle' ).change
|
421 |
} else {
|
422 |
// If non-SPB mode is enabled, show all settings that may have been hidden.
|
423 |
$( '#woocommerce_ppec_paypal_button_size, #woocommerce_ppec_paypal_credit_enabled' ).closest( 'tr' ).show();
|
@@ -428,16 +428,16 @@
|
|
428 |
button_size.find( 'option[value=\"responsive\"]' ).prop( 'disabled', ! checked );
|
429 |
! checked && button_size.find( 'option[value=\"small\"]' ).prop( 'disabled', false );
|
430 |
$( document.body ).trigger( 'wc-enhanced-select-init' );
|
431 |
-
} ).change
|
432 |
|
433 |
// Reset button size values to default when switching modes.
|
434 |
-
$( '#woocommerce_ppec_paypal_use_spb' ).
|
435 |
if ( $( event.target ).is( ':checked' ) ) {
|
436 |
// In SPB mode, set to recommended 'Responsive' value so it is not missed.
|
437 |
-
$( '#woocommerce_ppec_paypal_button_size' ).val( 'responsive' ).change
|
438 |
} else if ( ! $( '#woocommerce_ppec_paypal_button_size' ).val() ) {
|
439 |
// Set back to original default for non-SPB mode.
|
440 |
-
$( '#woocommerce_ppec_paypal_button_size' ).val( 'large' ).change
|
441 |
}
|
442 |
} );
|
443 |
} );
|
156 |
// If the enter key is pressed.
|
157 |
if ( 13 === event.which ) {
|
158 |
event.preventDefault();
|
159 |
+
$( ".woocommerce-save-button[name='save']" ).trigger( 'click' );
|
160 |
}
|
161 |
},
|
162 |
};
|
189 |
// as of v1.7.0 this option is enabled by default, but can be modified using a filter. Hiding the checkbox will let the settings page hide/show the correct settings depending on whether spb is enabled or disabled
|
190 |
$( '#woocommerce_ppec_paypal_use_spb' ).closest( 'tr' ).hide();
|
191 |
|
192 |
+
$( '#woocommerce_ppec_paypal_environment' ).on( 'change', function(){
|
193 |
$( ppec_sandbox_fields + ',' + ppec_live_fields ).closest( 'tr' ).hide();
|
194 |
|
195 |
if ( 'live' === $( this ).val() ) {
|
207 |
$( ppec_sandbox_fields ).closest( 'tr' ).show();
|
208 |
}
|
209 |
}
|
210 |
+
}).trigger( 'change' );
|
211 |
|
212 |
+
$( '#woocommerce_ppec_paypal_enabled' ).on( 'change', function(){
|
213 |
if ( $( this ).is( ':checked' ) ) {
|
214 |
$( ppec_mark_fields ).closest( 'tr' ).show();
|
215 |
} else {
|
216 |
$( ppec_mark_fields ).closest( 'tr' ).hide();
|
217 |
}
|
218 |
+
}).trigger( 'change' );
|
219 |
|
220 |
+
$( '#woocommerce_ppec_paypal_paymentaction' ).on( 'change', function(){
|
221 |
if ( 'sale' === $( this ).val() ) {
|
222 |
$( '#woocommerce_ppec_paypal_instant_payments' ).closest( 'tr' ).show();
|
223 |
} else {
|
224 |
$( '#woocommerce_ppec_paypal_instant_payments' ).closest( 'tr' ).hide();
|
225 |
}
|
226 |
+
}).trigger( 'change' );
|
227 |
|
228 |
if ( enable_toggle ) {
|
229 |
$( document ).off( 'click', '.ppec-toggle-settings' );
|
246 |
var refreshOnChange = [ 'button_layout', 'hide_funding_methods[]', 'credit_enabled', 'credit_message_enabled', 'credit_message_layout', 'credit_message_logo' ];
|
247 |
var selector = $.map( refreshOnChange, function( val ) { return '[name^="woocommerce_ppec_paypal_"][name$="' + val + '"]'; } ).join( ', ' );
|
248 |
|
249 |
+
$( selector ).on( 'change', this.refreshUI );
|
250 |
|
251 |
// Trigger this to configure initial state for cart settings.
|
252 |
+
$( '#woocommerce_ppec_paypal_credit_enabled' ).trigger( 'change' );
|
253 |
+
$( '#woocommerce_ppec_paypal_hide_funding_methods' ).trigger( 'change' );
|
254 |
},
|
255 |
|
256 |
refreshUI: function( event ) {
|
305 |
};
|
306 |
creditSettings.init();
|
307 |
|
308 |
+
$( '.woocommerce_ppec_paypal_button_layout' ).on( 'change', function( event ) {
|
309 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
310 |
return;
|
311 |
}
|
323 |
button_size.removeClass( 'enhanced' );
|
324 |
button_size_option.prop( 'disabled', isVertical );
|
325 |
$( document.body ).trigger( 'wc-enhanced-select-init' );
|
326 |
+
! button_size.val() && button_size.val( 'responsive' ).trigger( 'change' );
|
327 |
}
|
328 |
+
} ).trigger( 'change' );
|
329 |
|
330 |
// Hide default layout and size settings if they'll be overridden anyway.
|
331 |
function showHideDefaultButtonSettings() {
|
335 |
( $( '#woocommerce_ppec_paypal_mark_enabled' ).is( ':checked' ) && ! $( '#woocommerce_ppec_paypal_mark_settings_toggle' ).is( ':checked' ) );
|
336 |
|
337 |
$( '#woocommerce_ppec_paypal_button_layout, #woocommerce_ppec_paypal_button_size, #woocommerce_ppec_paypal_hide_funding_methods, #woocommerce_ppec_paypal_credit_enabled' ).closest( 'tr' ).toggle( display );
|
338 |
+
display && $( '#woocommerce_ppec_paypal_button_layout' ).trigger( 'change' );
|
339 |
}
|
340 |
|
341 |
// Toggle mini-cart section based on whether checkout on cart page is enabled
|
342 |
+
$( '#woocommerce_ppec_paypal_cart_checkout_enabled' ).on( 'change', function( event ) {
|
343 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
344 |
return;
|
345 |
}
|
351 |
.next( 'p' ) // Select description if present.
|
352 |
.addBack()
|
353 |
.toggle( checked );
|
354 |
+
checked && $( '#woocommerce_ppec_paypal_mini_cart_settings_toggle' ).trigger( 'change' );
|
355 |
showHideDefaultButtonSettings();
|
356 |
+
} ).trigger( 'change' );
|
357 |
|
358 |
+
$( '#woocommerce_ppec_paypal_mini_cart_settings_toggle' ).on( 'change', function( event ) {
|
359 |
// Only show settings specific to mini-cart if configured to override global settings.
|
360 |
var checked = $( event.target ).is( ':checked' );
|
361 |
$( '.woocommerce_ppec_paypal_mini_cart' ).closest( 'tr' ).toggle( checked );
|
362 |
+
checked && $( '#woocommerce_ppec_paypal_mini_cart_button_layout' ).trigger( 'change' );
|
363 |
showHideDefaultButtonSettings();
|
364 |
+
} ).trigger( 'change' );
|
365 |
|
366 |
+
$( '#woocommerce_ppec_paypal_checkout_on_single_product_enabled, #woocommerce_ppec_paypal_single_product_settings_toggle' ).on( 'change', function( event ) {
|
367 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
368 |
return;
|
369 |
}
|
378 |
} else {
|
379 |
// Show all settings in section.
|
380 |
$( '#woocommerce_ppec_paypal_single_product_settings_toggle, .woocommerce_ppec_paypal_single_product' ).closest( 'tr' ).show();
|
381 |
+
$( '#woocommerce_ppec_paypal_single_product_button_layout' ).trigger( 'change' );
|
382 |
+
$( '#woocommerce_ppec_paypal_single_product_credit_enabled' ).trigger( 'change' );
|
383 |
}
|
384 |
showHideDefaultButtonSettings();
|
385 |
+
} ).trigger( 'change' );
|
386 |
|
387 |
+
$( '#woocommerce_ppec_paypal_mark_enabled, #woocommerce_ppec_paypal_mark_settings_toggle' ).on( 'change', function() {
|
388 |
if ( ! $( '#woocommerce_ppec_paypal_use_spb' ).is( ':checked' ) ) {
|
389 |
return;
|
390 |
}
|
399 |
} else {
|
400 |
// Show all settings in section.
|
401 |
$( '#woocommerce_ppec_paypal_mark_settings_toggle, .woocommerce_ppec_paypal_mark' ).closest( 'tr' ).show();
|
402 |
+
$( '#woocommerce_ppec_paypal_mark_button_layout' ).trigger( 'change' );
|
403 |
+
$( '#woocommerce_ppec_paypal_mark_credit_enabled' ).trigger( 'change' );
|
404 |
}
|
405 |
showHideDefaultButtonSettings();
|
406 |
+
} ).trigger( 'change' );
|
407 |
|
408 |
// Make sure handlers are only attached once if script is loaded multiple times.
|
409 |
$( '#woocommerce_ppec_paypal_use_spb' ).off( 'change' );
|
410 |
|
411 |
+
$( '#woocommerce_ppec_paypal_use_spb' ).on( 'change', function( event ) {
|
412 |
var checked = $( event.target ).is( ':checked' );
|
413 |
|
414 |
// Show settings specific to Smart Payment Buttons only if enabled.
|
417 |
|
418 |
if ( checked ) {
|
419 |
// Trigger all logic that controls visibility of other settings.
|
420 |
+
$( '.woocommerce_ppec_paypal_visibility_toggle' ).trigger( 'change' );
|
421 |
} else {
|
422 |
// If non-SPB mode is enabled, show all settings that may have been hidden.
|
423 |
$( '#woocommerce_ppec_paypal_button_size, #woocommerce_ppec_paypal_credit_enabled' ).closest( 'tr' ).show();
|
428 |
button_size.find( 'option[value=\"responsive\"]' ).prop( 'disabled', ! checked );
|
429 |
! checked && button_size.find( 'option[value=\"small\"]' ).prop( 'disabled', false );
|
430 |
$( document.body ).trigger( 'wc-enhanced-select-init' );
|
431 |
+
} ).trigger( 'change' );
|
432 |
|
433 |
// Reset button size values to default when switching modes.
|
434 |
+
$( '#woocommerce_ppec_paypal_use_spb' ).on( 'change', function( event ) {
|
435 |
if ( $( event.target ).is( ':checked' ) ) {
|
436 |
// In SPB mode, set to recommended 'Responsive' value so it is not missed.
|
437 |
+
$( '#woocommerce_ppec_paypal_button_size' ).val( 'responsive' ).trigger( 'change' );
|
438 |
} else if ( ! $( '#woocommerce_ppec_paypal_button_size' ).val() ) {
|
439 |
// Set back to original default for non-SPB mode.
|
440 |
+
$( '#woocommerce_ppec_paypal_button_size' ).val( 'large' ).trigger( 'change' );
|
441 |
}
|
442 |
} );
|
443 |
} );
|
assets/js/wc-gateway-ppec-smart-payment-buttons.js
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
// Adapted from https://github.com/woocommerce/woocommerce/blob/ea9aa8cd59c9fa735460abf0ebcb97fa18f80d03/assets/js/frontend/checkout.js#L514-L529
|
20 |
$( '.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message' ).remove();
|
21 |
$container.prepend( '<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">' + errorMessage + '</div>' );
|
22 |
-
$container.find( '.input-text, select, input:checkbox' ).trigger( 'validate' ).blur
|
23 |
|
24 |
var scrollElement = $( '.woocommerce-NoticeGroup-checkout' );
|
25 |
if ( ! scrollElement.length ) {
|
@@ -186,7 +186,7 @@
|
|
186 |
$( 'form.checkout' )
|
187 |
.append( $( '<input type="hidden" name="paymentToken" /> ' ).attr( 'value', ! wc_ppec_context.use_checkout_js ? data.orderID : data.paymentToken ) )
|
188 |
.append( $( '<input type="hidden" name="payerID" /> ' ).attr( 'value', data.payerID ) )
|
189 |
-
.submit
|
190 |
} else {
|
191 |
// Navigate to order confirmation URL specified in original request to PayPal from back-end.
|
192 |
if ( ! wc_ppec_context.use_checkout_js ) {
|
@@ -248,7 +248,7 @@
|
|
248 |
onError: button_args.onError,
|
249 |
onCancel: button_args.onCancel,
|
250 |
fundingSource: fundingSource,
|
251 |
-
style: ( paypal.FUNDING.PAYPAL === fundingSource ) ? button_args.style : { layout: button_args.style.layout }
|
252 |
};
|
253 |
|
254 |
var button = paypal.Buttons( buttonSettings );
|
@@ -268,6 +268,7 @@
|
|
268 |
if ( 'checkout' !== wc_ppec_context.page ) {
|
269 |
render();
|
270 |
}
|
|
|
271 |
$( document.body ).on( 'updated_cart_totals updated_checkout', render.bind( this, false ) );
|
272 |
}
|
273 |
|
19 |
// Adapted from https://github.com/woocommerce/woocommerce/blob/ea9aa8cd59c9fa735460abf0ebcb97fa18f80d03/assets/js/frontend/checkout.js#L514-L529
|
20 |
$( '.woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message' ).remove();
|
21 |
$container.prepend( '<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">' + errorMessage + '</div>' );
|
22 |
+
$container.find( '.input-text, select, input:checkbox' ).trigger( 'validate' ).trigger( 'blur' );
|
23 |
|
24 |
var scrollElement = $( '.woocommerce-NoticeGroup-checkout' );
|
25 |
if ( ! scrollElement.length ) {
|
186 |
$( 'form.checkout' )
|
187 |
.append( $( '<input type="hidden" name="paymentToken" /> ' ).attr( 'value', ! wc_ppec_context.use_checkout_js ? data.orderID : data.paymentToken ) )
|
188 |
.append( $( '<input type="hidden" name="payerID" /> ' ).attr( 'value', data.payerID ) )
|
189 |
+
.trigger( 'submit' );
|
190 |
} else {
|
191 |
// Navigate to order confirmation URL specified in original request to PayPal from back-end.
|
192 |
if ( ! wc_ppec_context.use_checkout_js ) {
|
248 |
onError: button_args.onError,
|
249 |
onCancel: button_args.onCancel,
|
250 |
fundingSource: fundingSource,
|
251 |
+
style: ( paypal.FUNDING.PAYPAL === fundingSource ) ? button_args.style : { layout: button_args.style.layout, shape: button_args.style.shape }
|
252 |
};
|
253 |
|
254 |
var button = paypal.Buttons( buttonSettings );
|
268 |
if ( 'checkout' !== wc_ppec_context.page ) {
|
269 |
render();
|
270 |
}
|
271 |
+
|
272 |
$( document.body ).on( 'updated_cart_totals updated_checkout', render.bind( this, false ) );
|
273 |
}
|
274 |
|
changelog.txt
CHANGED
@@ -1,5 +1,18 @@
|
|
1 |
*** Changelog ***
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 2.1.1 - 2020-11-24 =
|
4 |
* Fix - Update the bundle.pem file to use the certificates from PayPal. PR#822
|
5 |
* Tweak - PHP 8.0 compatibility. PR#837
|
1 |
*** Changelog ***
|
2 |
|
3 |
+
= 2.1.2 - 2021-06-28 =
|
4 |
+
* Fix - Prevent fatal error when a line item isn't a WC_Product instance. PR#872
|
5 |
+
* Fix - [WC Subscriptions] Update the shipping packages address using a dynamic key rather than assuming a 0 index. PR#871
|
6 |
+
* New - Allow hiding of funding methods MercadoPago and BLIK. PR#870
|
7 |
+
* Tweak - Make labels/descriptions more consistent on the settings screen. PR#771
|
8 |
+
* Tweak - Make WooCommerce 3.2.0 explicit. PR#868
|
9 |
+
* Dev - Add hooks to alter names and descriptions of line items sent to PayPal. PR#869
|
10 |
+
* Fix - Create session cookie only when needed. PR#793, PR#845.
|
11 |
+
* Tweak - Mark as compatible with latest WordPress and WooCommerce. PR#867
|
12 |
+
* Fix - Replace jQuery 3.x deprecated functions. PR#852
|
13 |
+
* Fix - Honor shape settings when rendering buttons for alternative funding sources. PR#844
|
14 |
+
* New - Add notice on plugins page to upgrade to PayPal Payments. PR#866
|
15 |
+
|
16 |
= 2.1.1 - 2020-11-24 =
|
17 |
* Fix - Update the bundle.pem file to use the certificates from PayPal. PR#822
|
18 |
* Tweak - PHP 8.0 compatibility. PR#837
|
includes/abstracts/abstract-wc-gateway-ppec.php
CHANGED
@@ -226,9 +226,15 @@ abstract class WC_Gateway_PPEC extends WC_Payment_Gateway {
|
|
226 |
}
|
227 |
|
228 |
$expiry_date = new WC_DateTime( "@{$valid_until}", new DateTimeZone( 'UTC' ) );
|
229 |
-
$expiry_date->
|
230 |
|
231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
// Translators: 1) is a certificate's CN, 2) is the expiration date.
|
233 |
$output = sprintf( __( 'Certificate belongs to API username %1$s; %2$s.', 'woocommerce-gateway-paypal-express-checkout' ), $cert_info['subject']['CN'], $expires );
|
234 |
} else {
|
226 |
}
|
227 |
|
228 |
$expiry_date = new WC_DateTime( "@{$valid_until}", new DateTimeZone( 'UTC' ) );
|
229 |
+
$timestamp = $expiry_date->getTimestamp();
|
230 |
|
231 |
+
// If there's support for wp_timezone(), display the expiry date in server time. Otherwise, use UTC.
|
232 |
+
if ( function_exists( 'wp_timezone' ) ) {
|
233 |
+
$timestamp += $expiry_date->getOffset();
|
234 |
+
$expiry_date->setTimezone( wp_timezone() );
|
235 |
+
}
|
236 |
+
|
237 |
+
$expires = sprintf( $expires, date_i18n( get_option( 'date_format' ), $timestamp ), $expiry_date->format( 'T' ) );
|
238 |
// Translators: 1) is a certificate's CN, 2) is the expiration date.
|
239 |
$output = sprintf( __( 'Certificate belongs to API username %1$s; %2$s.', 'woocommerce-gateway-paypal-express-checkout' ), $cert_info['subject']['CN'], $expires );
|
240 |
} else {
|
includes/class-wc-gateway-ppec-cart-handler.php
CHANGED
@@ -34,9 +34,11 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
34 |
if ( 'yes' === wc_gateway_ppec()->settings->checkout_on_single_product_enabled ) {
|
35 |
add_action( 'woocommerce_after_add_to_cart_form', array( $this, 'display_paypal_button_product' ), 1 );
|
36 |
add_action( 'wc_ajax_wc_ppec_generate_cart', array( $this, 'wc_ajax_generate_cart' ) );
|
37 |
-
add_action( 'wp', array( $this, 'ensure_session' ) ); // Ensure there is a customer session so that nonce is not invalidated by new session created on AJAX POST request.
|
38 |
}
|
39 |
|
|
|
|
|
|
|
40 |
add_action( 'wc_ajax_wc_ppec_update_shipping_costs', array( $this, 'wc_ajax_update_shipping_costs' ) );
|
41 |
add_action( 'wc_ajax_wc_ppec_start_checkout', array( $this, 'wc_ajax_start_checkout' ) );
|
42 |
|
@@ -662,8 +664,10 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
662 |
|
663 |
/**
|
664 |
* Creates a customer session if one is not already active.
|
|
|
|
|
665 |
*/
|
666 |
-
public function
|
667 |
// TODO: this tries to replicate Woo core functionality of checking for frontend requests.
|
668 |
// It can be removed once we drop support for pre-3.5 versions.
|
669 |
$frontend = ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) && ! defined( 'REST_REQUEST' );
|
@@ -672,7 +676,9 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
672 |
return;
|
673 |
}
|
674 |
|
675 |
-
|
|
|
|
|
676 |
WC()->session->set_customer_session_cookie( true );
|
677 |
}
|
678 |
}
|
@@ -742,4 +748,12 @@ class WC_Gateway_PPEC_Cart_Handler {
|
|
742 |
public function setECParams() {
|
743 |
_deprecated_function( __METHOD__, '1.2.0', '' );
|
744 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
}
|
34 |
if ( 'yes' === wc_gateway_ppec()->settings->checkout_on_single_product_enabled ) {
|
35 |
add_action( 'woocommerce_after_add_to_cart_form', array( $this, 'display_paypal_button_product' ), 1 );
|
36 |
add_action( 'wc_ajax_wc_ppec_generate_cart', array( $this, 'wc_ajax_generate_cart' ) );
|
|
|
37 |
}
|
38 |
|
39 |
+
// Ensure there is a customer session so that nonce is not invalidated by new session created on AJAX POST request.
|
40 |
+
add_action( 'wp', array( $this, 'maybe_ensure_session' ) );
|
41 |
+
|
42 |
add_action( 'wc_ajax_wc_ppec_update_shipping_costs', array( $this, 'wc_ajax_update_shipping_costs' ) );
|
43 |
add_action( 'wc_ajax_wc_ppec_start_checkout', array( $this, 'wc_ajax_start_checkout' ) );
|
44 |
|
664 |
|
665 |
/**
|
666 |
* Creates a customer session if one is not already active.
|
667 |
+
*
|
668 |
+
* @since 2.1.2
|
669 |
*/
|
670 |
+
public function maybe_ensure_session() {
|
671 |
// TODO: this tries to replicate Woo core functionality of checking for frontend requests.
|
672 |
// It can be removed once we drop support for pre-3.5 versions.
|
673 |
$frontend = ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) && ! defined( 'REST_REQUEST' );
|
676 |
return;
|
677 |
}
|
678 |
|
679 |
+
$ensure_sesion = ( 'yes' === wc_gateway_ppec()->settings->checkout_on_single_product_enabled && is_product() ) || is_wc_endpoint_url( 'order-pay' );
|
680 |
+
|
681 |
+
if ( ! empty( WC()->session ) && ! WC()->session->has_session() && $ensure_sesion ) {
|
682 |
WC()->session->set_customer_session_cookie( true );
|
683 |
}
|
684 |
}
|
748 |
public function setECParams() {
|
749 |
_deprecated_function( __METHOD__, '1.2.0', '' );
|
750 |
}
|
751 |
+
|
752 |
+
/**
|
753 |
+
* @deprecated since 2.1.2
|
754 |
+
*/
|
755 |
+
public function ensure_session() {
|
756 |
+
_deprecated_function( __METHOD__, '2.1.2', 'WC_Gateway_PPEC_Cart_Handler::maybe_ensure_session()' );
|
757 |
+
$this->maybe_ensure_session();
|
758 |
+
}
|
759 |
}
|
includes/class-wc-gateway-ppec-checkout-handler.php
CHANGED
@@ -992,12 +992,15 @@ class WC_Gateway_PPEC_Checkout_Handler {
|
|
992 |
$destination = $this->get_mapped_shipping_address( $checkout_details );
|
993 |
|
994 |
if ( ! empty( $destination ) ) {
|
995 |
-
|
996 |
-
$
|
997 |
-
|
998 |
-
$packages[
|
999 |
-
$packages[
|
1000 |
-
$packages[
|
|
|
|
|
|
|
1001 |
}
|
1002 |
|
1003 |
return $packages;
|
992 |
$destination = $this->get_mapped_shipping_address( $checkout_details );
|
993 |
|
994 |
if ( ! empty( $destination ) ) {
|
995 |
+
// WC Subscriptions uses string package keys so we need to get the package key dynamically.
|
996 |
+
$package_key = key( $packages );
|
997 |
+
|
998 |
+
$packages[ $package_key ]['destination']['country'] = $destination['country'];
|
999 |
+
$packages[ $package_key ]['destination']['state'] = $destination['state'];
|
1000 |
+
$packages[ $package_key ]['destination']['postcode'] = $destination['postcode'];
|
1001 |
+
$packages[ $package_key ]['destination']['city'] = $destination['city'];
|
1002 |
+
$packages[ $package_key ]['destination']['address'] = $destination['address_1'];
|
1003 |
+
$packages[ $package_key ]['destination']['address_2'] = $destination['address_2'];
|
1004 |
}
|
1005 |
|
1006 |
return $packages;
|
includes/class-wc-gateway-ppec-client.php
CHANGED
@@ -508,8 +508,8 @@ class WC_Gateway_PPEC_Client {
|
|
508 |
}
|
509 |
|
510 |
$item = array(
|
511 |
-
'name' => $name,
|
512 |
-
'description' => $description,
|
513 |
'quantity' => $values['quantity'],
|
514 |
'amount' => $amount,
|
515 |
'sku' => $values['data']->get_sku(),
|
@@ -520,8 +520,8 @@ class WC_Gateway_PPEC_Client {
|
|
520 |
|
521 |
foreach ( WC()->cart->get_fees() as $fee_key => $fee_values ) {
|
522 |
$item = array(
|
523 |
-
'name' => $fee_values->name,
|
524 |
-
'description' => '',
|
525 |
'quantity' => 1,
|
526 |
'amount' => round( $fee_values->total, $decimals ),
|
527 |
);
|
@@ -828,7 +828,7 @@ class WC_Gateway_PPEC_Client {
|
|
828 |
|
829 |
if ( 'fee' === $order_item['type'] ) {
|
830 |
$item = array(
|
831 |
-
'name' => $order_item['name'],
|
832 |
'quantity' => 1,
|
833 |
'amount' => round( $order_item['line_total'], $decimals ),
|
834 |
);
|
@@ -836,10 +836,10 @@ class WC_Gateway_PPEC_Client {
|
|
836 |
$amount = round( $order_item['line_subtotal'] / $order_item['qty'], $decimals );
|
837 |
$product = version_compare( WC_VERSION, '3.0', '<' ) ? $order->get_product_from_item( $order_item ) : $order_item->get_product();
|
838 |
$item = array(
|
839 |
-
'name' => $order_item['name'],
|
840 |
'quantity' => $order_item['qty'],
|
841 |
'amount' => $amount,
|
842 |
-
'sku' => $product->get_sku(),
|
843 |
);
|
844 |
}
|
845 |
|
508 |
}
|
509 |
|
510 |
$item = array(
|
511 |
+
'name' => apply_filters( 'woocommerce_paypal_express_checkout_cart_line_item_name', $name, $values, $cart_item_key ),
|
512 |
+
'description' => apply_filters( 'woocommerce_paypal_express_checkout_cart_line_item_description', $description, $values, $cart_item_key ),
|
513 |
'quantity' => $values['quantity'],
|
514 |
'amount' => $amount,
|
515 |
'sku' => $values['data']->get_sku(),
|
520 |
|
521 |
foreach ( WC()->cart->get_fees() as $fee_key => $fee_values ) {
|
522 |
$item = array(
|
523 |
+
'name' => apply_filters( 'woocommerce_paypal_express_checkout_cart_fee_name', $fee_values->name, $fee_values, $fee_key ),
|
524 |
+
'description' => apply_filters( 'woocommerce_paypal_express_checkout_cart_fee_description', '', $fee_values, $fee_key ),
|
525 |
'quantity' => 1,
|
526 |
'amount' => round( $fee_values->total, $decimals ),
|
527 |
);
|
828 |
|
829 |
if ( 'fee' === $order_item['type'] ) {
|
830 |
$item = array(
|
831 |
+
'name' => apply_filters( 'woocommerce_paypal_express_checkout_order_line_item_name', $order_item['name'], $order_item, $cart_item_key ),
|
832 |
'quantity' => 1,
|
833 |
'amount' => round( $order_item['line_total'], $decimals ),
|
834 |
);
|
836 |
$amount = round( $order_item['line_subtotal'] / $order_item['qty'], $decimals );
|
837 |
$product = version_compare( WC_VERSION, '3.0', '<' ) ? $order->get_product_from_item( $order_item ) : $order_item->get_product();
|
838 |
$item = array(
|
839 |
+
'name' => apply_filters( 'woocommerce_paypal_express_checkout_order_line_item_name', $order_item['name'], $order_item, $cart_item_key ),
|
840 |
'quantity' => $order_item['qty'],
|
841 |
'amount' => $amount,
|
842 |
+
'sku' => ( $product && is_callable( array( $product, 'get_sku' ) ) ) ? $product->get_sku() : '',
|
843 |
);
|
844 |
}
|
845 |
|
includes/class-wc-gateway-ppec-plugin.php
CHANGED
@@ -149,6 +149,10 @@ class WC_Gateway_PPEC_Plugin {
|
|
149 |
}
|
150 |
}
|
151 |
|
|
|
|
|
|
|
|
|
152 |
update_option( 'wc_ppec_version', $new_version );
|
153 |
}
|
154 |
|
@@ -165,6 +169,8 @@ class WC_Gateway_PPEC_Plugin {
|
|
165 |
add_filter( 'plugin_action_links_' . plugin_basename( $this->file ), array( $this, 'plugin_action_links' ) );
|
166 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
167 |
add_action( 'wp_ajax_ppec_dismiss_notice_message', array( $this, 'ajax_dismiss_notice' ) );
|
|
|
|
|
168 |
}
|
169 |
|
170 |
public function bootstrap() {
|
@@ -275,8 +281,8 @@ class WC_Gateway_PPEC_Plugin {
|
|
275 |
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires WooCommerce to be activated', 'woocommerce-gateway-paypal-express-checkout' ), self::DEPENDENCIES_UNSATISFIED );
|
276 |
}
|
277 |
|
278 |
-
if ( version_compare( WC()->version, '2.
|
279 |
-
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires WooCommerce version 2.
|
280 |
}
|
281 |
|
282 |
if ( ! function_exists( 'curl_init' ) ) {
|
@@ -492,6 +498,22 @@ class WC_Gateway_PPEC_Plugin {
|
|
492 |
return apply_filters( 'woocommerce_cart_needs_shipping', $needs_shipping );
|
493 |
}
|
494 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
/* Deprecated Functions */
|
496 |
|
497 |
/**
|
149 |
}
|
150 |
}
|
151 |
|
152 |
+
if ( function_exists( 'add_woocommerce_inbox_variant' ) ) {
|
153 |
+
add_woocommerce_inbox_variant();
|
154 |
+
}
|
155 |
+
|
156 |
update_option( 'wc_ppec_version', $new_version );
|
157 |
}
|
158 |
|
169 |
add_filter( 'plugin_action_links_' . plugin_basename( $this->file ), array( $this, 'plugin_action_links' ) );
|
170 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
171 |
add_action( 'wp_ajax_ppec_dismiss_notice_message', array( $this, 'ajax_dismiss_notice' ) );
|
172 |
+
|
173 |
+
add_action( 'after_plugin_row_' . plugin_basename( $this->file ), array( $this, 'ppec_upgrade_notice' ), 10, 3 );
|
174 |
}
|
175 |
|
176 |
public function bootstrap() {
|
281 |
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires WooCommerce to be activated', 'woocommerce-gateway-paypal-express-checkout' ), self::DEPENDENCIES_UNSATISFIED );
|
282 |
}
|
283 |
|
284 |
+
if ( version_compare( WC()->version, '3.2.0', '<' ) ) {
|
285 |
+
throw new Exception( __( 'WooCommerce Gateway PayPal Checkout requires WooCommerce version 3.2.0 or greater', 'woocommerce-gateway-paypal-express-checkout' ), self::DEPENDENCIES_UNSATISFIED );
|
286 |
}
|
287 |
|
288 |
if ( ! function_exists( 'curl_init' ) ) {
|
498 |
return apply_filters( 'woocommerce_cart_needs_shipping', $needs_shipping );
|
499 |
}
|
500 |
|
501 |
+
/**
|
502 |
+
* Displays notice to upgrade to PayPal Payments.
|
503 |
+
*
|
504 |
+
* @param string $plugin_file Path to the plugin file relative to the plugins directory.
|
505 |
+
* @param array $plugin_data An array of plugin data.
|
506 |
+
* @param string $status Status filter currently applied to the plugin list.
|
507 |
+
*/
|
508 |
+
public function ppec_upgrade_notice( $plugin_file, $plugin_data, $status ) {
|
509 |
+
// Load styles & scripts required for the notice.
|
510 |
+
wp_enqueue_style( 'ppec-upgrade-notice', plugin_dir_url( __DIR__ ) . '/assets/css/admin/ppec-upgrade-notice.css', array(), WC_GATEWAY_PPEC_VERSION );
|
511 |
+
wp_enqueue_script( 'ppec-upgrade-notice-js', plugin_dir_url( __DIR__ ) . '/assets/js/admin/ppec-upgrade-notice.js', array(), WC_GATEWAY_PPEC_VERSION, false );
|
512 |
+
|
513 |
+
// Load notice template.
|
514 |
+
include_once $this->plugin_path . 'templates/paypal-payments-upgrade-notice.php';
|
515 |
+
}
|
516 |
+
|
517 |
/* Deprecated Functions */
|
518 |
|
519 |
/**
|
includes/settings/settings-ppec.php
CHANGED
@@ -426,18 +426,20 @@ $per_context_settings = array(
|
|
426 |
'desc_tip' => true,
|
427 |
'description' => __( 'Hides the specified funding methods.', 'woocommerce-gateway-paypal-express-checkout' ),
|
428 |
'options' => array(
|
429 |
-
'
|
430 |
-
'
|
431 |
-
'
|
432 |
-
'
|
433 |
-
'
|
434 |
-
'
|
435 |
-
'
|
436 |
-
'
|
437 |
-
'
|
438 |
-
'MYBANK'
|
439 |
-
'P24'
|
440 |
-
'
|
|
|
|
|
441 |
),
|
442 |
),
|
443 |
'credit_enabled' => array(
|
@@ -564,11 +566,10 @@ $per_context_settings['button_size']['class'] .= ' woocommerce_ppec_paypal_sp
|
|
564 |
$per_context_settings['credit_enabled']['class'] .= ' woocommerce_ppec_paypal_spb';
|
565 |
|
566 |
$settings['cart_checkout_enabled'] = array(
|
567 |
-
'title' => __( '
|
568 |
'type' => 'checkbox',
|
569 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
570 |
-
'label' => __( 'Enable PayPal Checkout on the cart page', 'woocommerce-gateway-paypal-express-checkout' ),
|
571 |
-
'description' => __( 'This shows or hides the PayPal Checkout button on the cart page.', 'woocommerce-gateway-paypal-express-checkout' ),
|
572 |
'desc_tip' => true,
|
573 |
'default' => 'yes',
|
574 |
);
|
@@ -611,13 +612,12 @@ $settings['single_product_settings'] = array(
|
|
611 |
);
|
612 |
|
613 |
$settings['checkout_on_single_product_enabled'] = array(
|
614 |
-
'title' => __( '
|
615 |
'type' => 'checkbox',
|
616 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
617 |
-
'label' => __( 'Checkout on
|
618 |
'default' => 'yes',
|
619 |
'desc_tip' => true,
|
620 |
-
'description' => __( 'Enable PayPal Checkout on Single Product view.', 'woocommerce-gateway-paypal-express-checkout' ),
|
621 |
);
|
622 |
|
623 |
$settings['single_product_settings_toggle'] = array(
|
@@ -645,11 +645,10 @@ $settings['mark_settings'] = array(
|
|
645 |
);
|
646 |
|
647 |
$settings['mark_enabled'] = array(
|
648 |
-
'title' => __( '
|
649 |
'type' => 'checkbox',
|
650 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
651 |
-
'label' => __( 'Enable
|
652 |
-
'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' ),
|
653 |
'desc_tip' => true,
|
654 |
'default' => 'yes',
|
655 |
);
|
426 |
'desc_tip' => true,
|
427 |
'description' => __( 'Hides the specified funding methods.', 'woocommerce-gateway-paypal-express-checkout' ),
|
428 |
'options' => array(
|
429 |
+
'CARD' => __( 'Credit or debit cards', 'woocommerce-gateway-paypal-express-checkout' ),
|
430 |
+
'CREDIT' => __( 'PayPal Credit', 'woocommerce-gateway-paypal-express-checkout' ),
|
431 |
+
'BANCONTACT' => __( 'Bancontact', 'woocommerce-gateway-paypal-express-checkout' ),
|
432 |
+
'BLIK' => __( 'BLIK', 'woocommerce-gateway-paypal-express-checkout' ),
|
433 |
+
'ELV' => __( 'ELV', 'woocommerce-gateway-paypal-express-checkout' ),
|
434 |
+
'EPS' => __( 'eps', 'woocommerce-gateway-paypal-express-checkout' ),
|
435 |
+
'GIROPAY' => __( 'giropay', 'woocommerce-gateway-paypal-express-checkout' ),
|
436 |
+
'IDEAL' => __( 'iDEAL', 'woocommerce-gateway-paypal-express-checkout' ),
|
437 |
+
'MERCADOPAGO' => __( 'MercadoPago', 'woocommerce-gateway-paypal-express-checkout' ),
|
438 |
+
'MYBANK' => __( 'MyBank', 'woocommerce-gateway-paypal-express-checkout' ),
|
439 |
+
'P24' => __( 'Przelewy24', 'woocommerce-gateway-paypal-express-checkout' ),
|
440 |
+
'SEPA' => __( 'SEPA-Lastschrift', 'woocommerce-gateway-paypal-express-checkout' ),
|
441 |
+
'SOFORT' => __( 'Sofort', 'woocommerce-gateway-paypal-express-checkout' ),
|
442 |
+
'VENMO' => __( 'Venmo', 'woocommerce-gateway-paypal-express-checkout' ),
|
443 |
),
|
444 |
),
|
445 |
'credit_enabled' => array(
|
566 |
$per_context_settings['credit_enabled']['class'] .= ' woocommerce_ppec_paypal_spb';
|
567 |
|
568 |
$settings['cart_checkout_enabled'] = array(
|
569 |
+
'title' => __( 'Enable on the cart page', 'woocommerce-gateway-paypal-express-checkout' ),
|
570 |
'type' => 'checkbox',
|
571 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
572 |
+
'label' => __( 'Enable PayPal Checkout buttons on the cart page', 'woocommerce-gateway-paypal-express-checkout' ),
|
|
|
573 |
'desc_tip' => true,
|
574 |
'default' => 'yes',
|
575 |
);
|
612 |
);
|
613 |
|
614 |
$settings['checkout_on_single_product_enabled'] = array(
|
615 |
+
'title' => __( 'Enable on the single product page', 'woocommerce-gateway-paypal-express-checkout' ),
|
616 |
'type' => 'checkbox',
|
617 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
618 |
+
'label' => __( 'Enable PayPal Checkout buttons on the single product page', 'woocommerce-gateway-paypal-express-checkout' ),
|
619 |
'default' => 'yes',
|
620 |
'desc_tip' => true,
|
|
|
621 |
);
|
622 |
|
623 |
$settings['single_product_settings_toggle'] = array(
|
645 |
);
|
646 |
|
647 |
$settings['mark_enabled'] = array(
|
648 |
+
'title' => __( 'Enable on the checkout page', 'woocommerce-gateway-paypal-express-checkout' ),
|
649 |
'type' => 'checkbox',
|
650 |
'class' => 'woocommerce_ppec_paypal_visibility_toggle',
|
651 |
+
'label' => __( 'Enable PayPal Checkout buttons on the regular checkout page', 'woocommerce-gateway-paypal-express-checkout' ),
|
|
|
652 |
'desc_tip' => true,
|
653 |
'default' => 'yes',
|
654 |
);
|
languages/woocommerce-gateway-paypal-express-checkout.pot
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the WooCommerce PayPal Checkout Gateway plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WooCommerce PayPal Checkout Gateway 2.1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date:
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: woocommerce-gateway-paypal-express-checkout\n"
|
@@ -68,102 +68,102 @@ msgid "expired on %1$s (%2$s)"
|
|
68 |
msgstr ""
|
69 |
|
70 |
#. Translators: 1) is a certificate's CN, 2) is the expiration date.
|
71 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
72 |
msgid "Certificate belongs to API username %1$s; %2$s."
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
76 |
msgid "The certificate on file is not valid."
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
80 |
msgid "Error: You must enter API username."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
84 |
msgid "Error: You must enter API password."
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
88 |
msgid "Error: You must provide API signature or certificate."
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
92 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
93 |
msgid "Error: The API credentials you provided are not valid. Please double-check that you entered them correctly and try again."
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
97 |
msgid "An error occurred while trying to validate your API credentials. Unable to verify that your API credentials are correct."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
101 |
msgid "Error: The API certificate is not valid."
|
102 |
msgstr ""
|
103 |
|
104 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
105 |
msgid "Error: The API certificate has expired."
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
109 |
msgid "Error: The API username does not match the name in the API certificate. Make sure that you have the correct API certificate."
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
113 |
msgid "An error occurred while trying to validate your API credentials. Unable to verify that your API credentials are correct."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
117 |
msgid "The \"require billing address\" option is not enabled by your account and has been disabled."
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
121 |
msgid "Refund Error: You need to specify a refund amount."
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
125 |
msgid "Refund Error: Sorry! This is not a refundable transaction."
|
126 |
msgstr ""
|
127 |
|
128 |
#. Translators: placeholder is a transaction ID.
|
129 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
130 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
131 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
132 |
msgid "PayPal refund completed; transaction ID = %s"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
136 |
msgid "Refund Error: All transactions have been fully refunded. There is no amount left to refund"
|
137 |
msgstr ""
|
138 |
|
139 |
#. Translators: placeholder is an amount (with currency symbol).
|
140 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
141 |
msgid "Refund Error: The requested refund amount is too large. The refund amount must be less than or equal to %s."
|
142 |
msgstr ""
|
143 |
|
144 |
#. Translators: placeholder is an image's URL.
|
145 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
146 |
msgid "Already using URL as image: %s"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
150 |
msgid "Select a image to upload"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
154 |
msgid "Use this image"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
158 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
159 |
msgid "Add image"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
163 |
msgid "Remove image"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/abstracts/abstract-wc-gateway-ppec.php:
|
167 |
msgid "Remove"
|
168 |
msgstr ""
|
169 |
|
@@ -308,27 +308,27 @@ msgstr ""
|
|
308 |
msgid "An error (%s) occurred while processing your PayPal payment. Please contact the store owner for assistance."
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
312 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
313 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
314 |
msgid "Cheatin’ huh?"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
318 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
319 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
320 |
msgid "Check out with PayPal"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
324 |
msgid "OR"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
328 |
msgid "Pay with PayPal Credit"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: includes/class-wc-gateway-ppec-cart-handler.php:
|
332 |
msgid "An error occurred while processing your PayPal payment. Please contact the store owner for assistance."
|
333 |
msgstr ""
|
334 |
|
@@ -370,7 +370,7 @@ msgstr ""
|
|
370 |
|
371 |
#: includes/class-wc-gateway-ppec-checkout-handler.php:444
|
372 |
#: includes/class-wc-gateway-ppec-checkout-handler.php:499
|
373 |
-
#: includes/class-wc-gateway-ppec-checkout-handler.php:
|
374 |
msgid "Your PayPal checkout session has expired. Please check out again."
|
375 |
msgstr ""
|
376 |
|
@@ -398,19 +398,19 @@ msgstr ""
|
|
398 |
msgid "Payment pending (%s)."
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: includes/class-wc-gateway-ppec-checkout-handler.php:
|
402 |
msgid "The payment method was updated for this subscription."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: includes/class-wc-gateway-ppec-checkout-handler.php:
|
406 |
msgid "The payment method was updated for all your current subscriptions."
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: includes/class-wc-gateway-ppec-checkout-handler.php:
|
410 |
msgid "There was a problem updating your payment method. Please try again later or use a different payment method."
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/class-wc-gateway-ppec-checkout-handler.php:
|
414 |
msgid "You have cancelled Checkout with PayPal. The payment method was not updated."
|
415 |
msgstr ""
|
416 |
|
@@ -547,53 +547,53 @@ msgstr ""
|
|
547 |
msgid "Success! Your PayPal account has been set up successfully."
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
551 |
msgid "bootstrap() in WooCommerce Gateway PayPal Checkout plugin can only be called once"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
555 |
msgid "WooCommerce Gateway PayPal Checkout requires WooCommerce to be activated"
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
559 |
-
msgid "WooCommerce Gateway PayPal Checkout requires WooCommerce version 2.
|
560 |
msgstr ""
|
561 |
|
562 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
563 |
msgid "WooCommerce Gateway PayPal Checkout requires cURL to be installed on your server"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
567 |
msgid "WooCommerce Gateway PayPal Checkout requires OpenSSL >= 1.0.1 to be installed on your server"
|
568 |
msgstr ""
|
569 |
|
570 |
#. Translators: placeholder is the URL of the gateway settings page.
|
571 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
572 |
msgid "PayPal Checkout is almost ready. To get started, <a href=\"%s\">connect your PayPal account</a>."
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
576 |
msgid "Settings"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
580 |
msgid "View Documentation"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
584 |
msgid "Docs"
|
585 |
msgstr ""
|
586 |
|
587 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
588 |
msgid "Open a support request at WooCommerce.com"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
592 |
msgid "Support"
|
593 |
msgstr ""
|
594 |
|
595 |
#. Translators: placeholder is the URL of the gateway settings page.
|
596 |
-
#: includes/class-wc-gateway-ppec-plugin.php:
|
597 |
msgid "<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 removed</strong> in the <strong>next release</strong>. Please upgrade to Smart Payment Buttons on the <a href=\"%s\">PayPal Checkout settings page</a>.</p>"
|
598 |
msgstr ""
|
599 |
|
@@ -664,7 +664,7 @@ msgid "PayPal payment declined"
|
|
664 |
msgstr ""
|
665 |
|
666 |
#: includes/class-wc-gateway-ppec-with-paypal-credit.php:15
|
667 |
-
#: includes/settings/settings-ppec.php:
|
668 |
msgid "PayPal Credit"
|
669 |
msgstr ""
|
670 |
|
@@ -723,7 +723,7 @@ msgid "Your account setting is set to sandbox, no real charging takes place. To
|
|
723 |
msgstr ""
|
724 |
|
725 |
#: includes/settings/settings-ppec.php:63
|
726 |
-
#: includes/settings/settings-ppec.php:
|
727 |
msgid "Enable PayPal Credit to eligible customers"
|
728 |
msgstr ""
|
729 |
|
@@ -1050,7 +1050,7 @@ msgid "Gold (Recommended)"
|
|
1050 |
msgstr ""
|
1051 |
|
1052 |
#: includes/settings/settings-ppec.php:344
|
1053 |
-
#: includes/settings/settings-ppec.php:
|
1054 |
msgid "Blue"
|
1055 |
msgstr ""
|
1056 |
|
@@ -1059,8 +1059,8 @@ msgid "Silver"
|
|
1059 |
msgstr ""
|
1060 |
|
1061 |
#: includes/settings/settings-ppec.php:346
|
1062 |
-
#: includes/settings/settings-ppec.php:
|
1063 |
-
#: includes/settings/settings-ppec.php:
|
1064 |
msgid "Black"
|
1065 |
msgstr ""
|
1066 |
|
@@ -1147,36 +1147,36 @@ msgstr ""
|
|
1147 |
msgid "Hides the specified funding methods."
|
1148 |
msgstr ""
|
1149 |
|
1150 |
-
#: includes/settings/settings-ppec.php:
|
1151 |
-
msgid "
|
1152 |
msgstr ""
|
1153 |
|
1154 |
#: includes/settings/settings-ppec.php:431
|
1155 |
-
msgid "
|
1156 |
msgstr ""
|
1157 |
|
1158 |
#: includes/settings/settings-ppec.php:432
|
1159 |
-
msgid "
|
1160 |
msgstr ""
|
1161 |
|
1162 |
#: includes/settings/settings-ppec.php:433
|
1163 |
-
msgid "
|
1164 |
msgstr ""
|
1165 |
|
1166 |
#: includes/settings/settings-ppec.php:434
|
1167 |
-
msgid "
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#: includes/settings/settings-ppec.php:435
|
1171 |
-
msgid "
|
1172 |
msgstr ""
|
1173 |
|
1174 |
#: includes/settings/settings-ppec.php:436
|
1175 |
-
msgid "
|
1176 |
msgstr ""
|
1177 |
|
1178 |
#: includes/settings/settings-ppec.php:437
|
1179 |
-
msgid "
|
1180 |
msgstr ""
|
1181 |
|
1182 |
#: includes/settings/settings-ppec.php:438
|
@@ -1188,183 +1188,186 @@ msgid "Przelewy24"
|
|
1188 |
msgstr ""
|
1189 |
|
1190 |
#: includes/settings/settings-ppec.php:440
|
|
|
|
|
|
|
|
|
1191 |
msgid "Sofort"
|
1192 |
msgstr ""
|
1193 |
|
1194 |
-
#: includes/settings/settings-ppec.php:
|
1195 |
-
msgid "
|
1196 |
msgstr ""
|
1197 |
|
1198 |
#: includes/settings/settings-ppec.php:462
|
|
|
|
|
|
|
|
|
1199 |
msgid "Display credit messages on your website to promote special financing offers, which help increase sales."
|
1200 |
msgstr ""
|
1201 |
|
1202 |
-
#: includes/settings/settings-ppec.php:
|
1203 |
msgid "Credit Messaging Layout"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: includes/settings/settings-ppec.php:
|
1207 |
msgid "Text"
|
1208 |
msgstr ""
|
1209 |
|
1210 |
-
#: includes/settings/settings-ppec.php:
|
1211 |
msgid "Graphic"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
-
#: includes/settings/settings-ppec.php:
|
1215 |
msgid "The layout of the message."
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: includes/settings/settings-ppec.php:
|
1219 |
msgid "Credit Messaging logo"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
-
#: includes/settings/settings-ppec.php:
|
1223 |
msgid "Primary"
|
1224 |
msgstr ""
|
1225 |
|
1226 |
-
#: includes/settings/settings-ppec.php:
|
1227 |
msgid "Alternative"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: includes/settings/settings-ppec.php:
|
1231 |
msgid "In-Line"
|
1232 |
msgstr ""
|
1233 |
|
1234 |
-
#: includes/settings/settings-ppec.php:
|
1235 |
msgid "None"
|
1236 |
msgstr ""
|
1237 |
|
1238 |
-
#: includes/settings/settings-ppec.php:
|
1239 |
msgid "PayPal Credit logo used in the message."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: includes/settings/settings-ppec.php:
|
1243 |
msgid "Credit Messaging logo position"
|
1244 |
msgstr ""
|
1245 |
|
1246 |
-
#: includes/settings/settings-ppec.php:
|
1247 |
msgid "Left"
|
1248 |
msgstr ""
|
1249 |
|
1250 |
-
#: includes/settings/settings-ppec.php:
|
1251 |
msgid "Right"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
-
#: includes/settings/settings-ppec.php:
|
1255 |
msgid "Top"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
-
#: includes/settings/settings-ppec.php:
|
1259 |
msgid "Position of the PayPal logo in the message."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: includes/settings/settings-ppec.php:
|
1263 |
msgid "Credit Messaging text color"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
-
#: includes/settings/settings-ppec.php:
|
1267 |
-
#: includes/settings/settings-ppec.php:
|
1268 |
msgid "White"
|
1269 |
msgstr ""
|
1270 |
|
1271 |
-
#: includes/settings/settings-ppec.php:
|
1272 |
-
#: includes/settings/settings-ppec.php:
|
1273 |
msgid "Monochrome"
|
1274 |
msgstr ""
|
1275 |
|
1276 |
-
#: includes/settings/settings-ppec.php:
|
1277 |
-
#: includes/settings/settings-ppec.php:
|
1278 |
msgid "Grayscale"
|
1279 |
msgstr ""
|
1280 |
|
1281 |
-
#: includes/settings/settings-ppec.php:
|
1282 |
msgid "Text and logo color of the message."
|
1283 |
msgstr ""
|
1284 |
|
1285 |
-
#: includes/settings/settings-ppec.php:
|
1286 |
msgid "Credit Messaging color"
|
1287 |
msgstr ""
|
1288 |
|
1289 |
-
#: includes/settings/settings-ppec.php:
|
1290 |
msgid "Gray"
|
1291 |
msgstr ""
|
1292 |
|
1293 |
-
#: includes/settings/settings-ppec.php:
|
1294 |
msgid "White no border"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
-
#: includes/settings/settings-ppec.php:
|
1298 |
msgid "Color of the message."
|
1299 |
msgstr ""
|
1300 |
|
1301 |
-
#: includes/settings/settings-ppec.php:
|
1302 |
msgid "Credit Messaging ratio"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
-
#: includes/settings/settings-ppec.php:
|
1306 |
msgid "1x1"
|
1307 |
msgstr ""
|
1308 |
|
1309 |
-
#: includes/settings/settings-ppec.php:
|
1310 |
msgid "1x4"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
-
#: includes/settings/settings-ppec.php:
|
1314 |
msgid "8x1"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
-
#: includes/settings/settings-ppec.php:
|
1318 |
msgid "20x1"
|
1319 |
msgstr ""
|
1320 |
|
1321 |
-
#: includes/settings/settings-ppec.php:
|
1322 |
msgid "Shape and size of the message."
|
1323 |
msgstr ""
|
1324 |
|
1325 |
-
#: includes/settings/settings-ppec.php:
|
1326 |
-
msgid "
|
1327 |
-
msgstr ""
|
1328 |
-
|
1329 |
-
#: includes/settings/settings-ppec.php:570
|
1330 |
-
msgid "Enable PayPal Checkout on the cart page"
|
1331 |
msgstr ""
|
1332 |
|
1333 |
-
#: includes/settings/settings-ppec.php:
|
1334 |
-
msgid "
|
1335 |
msgstr ""
|
1336 |
|
1337 |
-
#: includes/settings/settings-ppec.php:
|
1338 |
msgid "Mini-cart Button Settings"
|
1339 |
msgstr ""
|
1340 |
|
1341 |
-
#: includes/settings/settings-ppec.php:
|
1342 |
#: includes/settings/settings-ppec.php:624
|
1343 |
-
#: includes/settings/settings-ppec.php:
|
1344 |
msgid "Configure Settings"
|
1345 |
msgstr ""
|
1346 |
|
1347 |
-
#: includes/settings/settings-ppec.php:
|
1348 |
msgid "Configure settings specific to mini-cart"
|
1349 |
msgstr ""
|
1350 |
|
1351 |
-
#: includes/settings/settings-ppec.php:
|
1352 |
#: includes/settings/settings-ppec.php:630
|
1353 |
-
#: includes/settings/settings-ppec.php:
|
1354 |
msgid "Optionally override global button settings above and configure buttons for this context."
|
1355 |
msgstr ""
|
1356 |
|
1357 |
-
#: includes/settings/settings-ppec.php:
|
1358 |
msgid "Single Product Button Settings"
|
1359 |
msgstr ""
|
1360 |
|
1361 |
-
#: includes/settings/settings-ppec.php:
|
1362 |
-
|
1363 |
-
msgid "Checkout on Single Product"
|
1364 |
msgstr ""
|
1365 |
|
1366 |
-
#: includes/settings/settings-ppec.php:
|
1367 |
-
msgid "Enable PayPal Checkout on
|
1368 |
msgstr ""
|
1369 |
|
1370 |
#: includes/settings/settings-ppec.php:625
|
@@ -1376,17 +1379,13 @@ msgid "Regular Checkout Button Settings"
|
|
1376 |
msgstr ""
|
1377 |
|
1378 |
#: includes/settings/settings-ppec.php:648
|
1379 |
-
msgid "
|
1380 |
msgstr ""
|
1381 |
|
1382 |
#: includes/settings/settings-ppec.php:651
|
1383 |
-
msgid "Enable
|
1384 |
msgstr ""
|
1385 |
|
1386 |
-
#: includes/settings/settings-ppec.php:
|
1387 |
-
msgid "This enables the PayPal mark, which can be shown on regular WooCommerce checkout to use PayPal Checkout like a regular WooCommerce gateway."
|
1388 |
-
msgstr ""
|
1389 |
-
|
1390 |
-
#: includes/settings/settings-ppec.php:659
|
1391 |
msgid "Configure settings specific to regular checkout"
|
1392 |
msgstr ""
|
1 |
+
# Copyright (C) 2021 WooCommerce
|
2 |
# This file is distributed under the same license as the WooCommerce PayPal Checkout Gateway plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WooCommerce PayPal Checkout Gateway 2.1.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-gateway-paypal-express-checkout\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-06-28T15:10:18+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: woocommerce-gateway-paypal-express-checkout\n"
|
68 |
msgstr ""
|
69 |
|
70 |
#. Translators: 1) is a certificate's CN, 2) is the expiration date.
|
71 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:239
|
72 |
msgid "Certificate belongs to API username %1$s; %2$s."
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:241
|
76 |
msgid "The certificate on file is not valid."
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:306
|
80 |
msgid "Error: You must enter API username."
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:310
|
84 |
msgid "Error: You must enter API password."
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:314
|
88 |
msgid "Error: You must provide API signature or certificate."
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:324
|
92 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:351
|
93 |
msgid "Error: The API credentials you provided are not valid. Please double-check that you entered them correctly and try again."
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:328
|
97 |
msgid "An error occurred while trying to validate your API credentials. Unable to verify that your API credentials are correct."
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:335
|
101 |
msgid "Error: The API certificate is not valid."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:342
|
105 |
msgid "Error: The API certificate has expired."
|
106 |
msgstr ""
|
107 |
|
108 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:344
|
109 |
msgid "Error: The API username does not match the name in the API certificate. Make sure that you have the correct API certificate."
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:354
|
113 |
msgid "An error occurred while trying to validate your API credentials. Unable to verify that your API credentials are correct."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:373
|
117 |
msgid "The \"require billing address\" option is not enabled by your account and has been disabled."
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:398
|
121 |
msgid "Refund Error: You need to specify a refund amount."
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:410
|
125 |
msgid "Refund Error: Sorry! This is not a refundable transaction."
|
126 |
msgstr ""
|
127 |
|
128 |
#. Translators: placeholder is a transaction ID.
|
129 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:423
|
130 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:448
|
131 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:500
|
132 |
msgid "PayPal refund completed; transaction ID = %s"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:472
|
136 |
msgid "Refund Error: All transactions have been fully refunded. There is no amount left to refund"
|
137 |
msgstr ""
|
138 |
|
139 |
#. Translators: placeholder is an amount (with currency symbol).
|
140 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:475
|
141 |
msgid "Refund Error: The requested refund amount is too large. The refund amount must be less than or equal to %s."
|
142 |
msgstr ""
|
143 |
|
144 |
#. Translators: placeholder is an image's URL.
|
145 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:593
|
146 |
msgid "Already using URL as image: %s"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:601
|
150 |
msgid "Select a image to upload"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:602
|
154 |
msgid "Use this image"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:603
|
158 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:606
|
159 |
msgid "Add image"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:614
|
163 |
msgid "Remove image"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/abstracts/abstract-wc-gateway-ppec.php:653
|
167 |
msgid "Remove"
|
168 |
msgstr ""
|
169 |
|
308 |
msgid "An error (%s) occurred while processing your PayPal payment. Please contact the store owner for assistance."
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:76
|
312 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:146
|
313 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:167
|
314 |
msgid "Cheatin’ huh?"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:331
|
318 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:378
|
319 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:413
|
320 |
msgid "Check out with PayPal"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:367
|
324 |
msgid "OR"
|
325 |
msgstr ""
|
326 |
|
327 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:383
|
328 |
msgid "Pay with PayPal Credit"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: includes/class-wc-gateway-ppec-cart-handler.php:587
|
332 |
msgid "An error occurred while processing your PayPal payment. Please contact the store owner for assistance."
|
333 |
msgstr ""
|
334 |
|
370 |
|
371 |
#: includes/class-wc-gateway-ppec-checkout-handler.php:444
|
372 |
#: includes/class-wc-gateway-ppec-checkout-handler.php:499
|
373 |
+
#: includes/class-wc-gateway-ppec-checkout-handler.php:1133
|
374 |
msgid "Your PayPal checkout session has expired. Please check out again."
|
375 |
msgstr ""
|
376 |
|
398 |
msgid "Payment pending (%s)."
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: includes/class-wc-gateway-ppec-checkout-handler.php:1144
|
402 |
msgid "The payment method was updated for this subscription."
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: includes/class-wc-gateway-ppec-checkout-handler.php:1149
|
406 |
msgid "The payment method was updated for all your current subscriptions."
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: includes/class-wc-gateway-ppec-checkout-handler.php:1158
|
410 |
msgid "There was a problem updating your payment method. Please try again later or use a different payment method."
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: includes/class-wc-gateway-ppec-checkout-handler.php:1181
|
414 |
msgid "You have cancelled Checkout with PayPal. The payment method was not updated."
|
415 |
msgstr ""
|
416 |
|
547 |
msgid "Success! Your PayPal account has been set up successfully."
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/class-wc-gateway-ppec-plugin.php:179
|
551 |
msgid "bootstrap() in WooCommerce Gateway PayPal Checkout plugin can only be called once"
|
552 |
msgstr ""
|
553 |
|
554 |
+
#: includes/class-wc-gateway-ppec-plugin.php:281
|
555 |
msgid "WooCommerce Gateway PayPal Checkout requires WooCommerce to be activated"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: includes/class-wc-gateway-ppec-plugin.php:285
|
559 |
+
msgid "WooCommerce Gateway PayPal Checkout requires WooCommerce version 3.2.0 or greater"
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: includes/class-wc-gateway-ppec-plugin.php:289
|
563 |
msgid "WooCommerce Gateway PayPal Checkout requires cURL to be installed on your server"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: includes/class-wc-gateway-ppec-plugin.php:292
|
567 |
msgid "WooCommerce Gateway PayPal Checkout requires OpenSSL >= 1.0.1 to be installed on your server"
|
568 |
msgstr ""
|
569 |
|
570 |
#. Translators: placeholder is the URL of the gateway settings page.
|
571 |
+
#: includes/class-wc-gateway-ppec-plugin.php:320
|
572 |
msgid "PayPal Checkout is almost ready. To get started, <a href=\"%s\">connect your PayPal account</a>."
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: includes/class-wc-gateway-ppec-plugin.php:450
|
576 |
msgid "Settings"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: includes/class-wc-gateway-ppec-plugin.php:469
|
580 |
msgid "View Documentation"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: includes/class-wc-gateway-ppec-plugin.php:469
|
584 |
msgid "Docs"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: includes/class-wc-gateway-ppec-plugin.php:470
|
588 |
msgid "Open a support request at WooCommerce.com"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: includes/class-wc-gateway-ppec-plugin.php:470
|
592 |
msgid "Support"
|
593 |
msgstr ""
|
594 |
|
595 |
#. Translators: placeholder is the URL of the gateway settings page.
|
596 |
+
#: includes/class-wc-gateway-ppec-plugin.php:542
|
597 |
msgid "<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 removed</strong> in the <strong>next release</strong>. Please upgrade to Smart Payment Buttons on the <a href=\"%s\">PayPal Checkout settings page</a>.</p>"
|
598 |
msgstr ""
|
599 |
|
664 |
msgstr ""
|
665 |
|
666 |
#: includes/class-wc-gateway-ppec-with-paypal-credit.php:15
|
667 |
+
#: includes/settings/settings-ppec.php:430
|
668 |
msgid "PayPal Credit"
|
669 |
msgstr ""
|
670 |
|
723 |
msgstr ""
|
724 |
|
725 |
#: includes/settings/settings-ppec.php:63
|
726 |
+
#: includes/settings/settings-ppec.php:446
|
727 |
msgid "Enable PayPal Credit to eligible customers"
|
728 |
msgstr ""
|
729 |
|
1050 |
msgstr ""
|
1051 |
|
1052 |
#: includes/settings/settings-ppec.php:344
|
1053 |
+
#: includes/settings/settings-ppec.php:530
|
1054 |
msgid "Blue"
|
1055 |
msgstr ""
|
1056 |
|
1059 |
msgstr ""
|
1060 |
|
1061 |
#: includes/settings/settings-ppec.php:346
|
1062 |
+
#: includes/settings/settings-ppec.php:514
|
1063 |
+
#: includes/settings/settings-ppec.php:529
|
1064 |
msgid "Black"
|
1065 |
msgstr ""
|
1066 |
|
1147 |
msgid "Hides the specified funding methods."
|
1148 |
msgstr ""
|
1149 |
|
1150 |
+
#: includes/settings/settings-ppec.php:429
|
1151 |
+
msgid "Credit or debit cards"
|
1152 |
msgstr ""
|
1153 |
|
1154 |
#: includes/settings/settings-ppec.php:431
|
1155 |
+
msgid "Bancontact"
|
1156 |
msgstr ""
|
1157 |
|
1158 |
#: includes/settings/settings-ppec.php:432
|
1159 |
+
msgid "BLIK"
|
1160 |
msgstr ""
|
1161 |
|
1162 |
#: includes/settings/settings-ppec.php:433
|
1163 |
+
msgid "ELV"
|
1164 |
msgstr ""
|
1165 |
|
1166 |
#: includes/settings/settings-ppec.php:434
|
1167 |
+
msgid "eps"
|
1168 |
msgstr ""
|
1169 |
|
1170 |
#: includes/settings/settings-ppec.php:435
|
1171 |
+
msgid "giropay"
|
1172 |
msgstr ""
|
1173 |
|
1174 |
#: includes/settings/settings-ppec.php:436
|
1175 |
+
msgid "iDEAL"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
#: includes/settings/settings-ppec.php:437
|
1179 |
+
msgid "MercadoPago"
|
1180 |
msgstr ""
|
1181 |
|
1182 |
#: includes/settings/settings-ppec.php:438
|
1188 |
msgstr ""
|
1189 |
|
1190 |
#: includes/settings/settings-ppec.php:440
|
1191 |
+
msgid "SEPA-Lastschrift"
|
1192 |
+
msgstr ""
|
1193 |
+
|
1194 |
+
#: includes/settings/settings-ppec.php:441
|
1195 |
msgid "Sofort"
|
1196 |
msgstr ""
|
1197 |
|
1198 |
+
#: includes/settings/settings-ppec.php:442
|
1199 |
+
msgid "Venmo"
|
1200 |
msgstr ""
|
1201 |
|
1202 |
#: includes/settings/settings-ppec.php:462
|
1203 |
+
msgid "Enable PayPal Credit messages"
|
1204 |
+
msgstr ""
|
1205 |
+
|
1206 |
+
#: includes/settings/settings-ppec.php:464
|
1207 |
msgid "Display credit messages on your website to promote special financing offers, which help increase sales."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: includes/settings/settings-ppec.php:467
|
1211 |
msgid "Credit Messaging Layout"
|
1212 |
msgstr ""
|
1213 |
|
1214 |
+
#: includes/settings/settings-ppec.php:472
|
1215 |
msgid "Text"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
+
#: includes/settings/settings-ppec.php:473
|
1219 |
msgid "Graphic"
|
1220 |
msgstr ""
|
1221 |
|
1222 |
+
#: includes/settings/settings-ppec.php:477
|
1223 |
msgid "The layout of the message."
|
1224 |
msgstr ""
|
1225 |
|
1226 |
+
#: includes/settings/settings-ppec.php:480
|
1227 |
msgid "Credit Messaging logo"
|
1228 |
msgstr ""
|
1229 |
|
1230 |
+
#: includes/settings/settings-ppec.php:485
|
1231 |
msgid "Primary"
|
1232 |
msgstr ""
|
1233 |
|
1234 |
+
#: includes/settings/settings-ppec.php:486
|
1235 |
msgid "Alternative"
|
1236 |
msgstr ""
|
1237 |
|
1238 |
+
#: includes/settings/settings-ppec.php:487
|
1239 |
msgid "In-Line"
|
1240 |
msgstr ""
|
1241 |
|
1242 |
+
#: includes/settings/settings-ppec.php:488
|
1243 |
msgid "None"
|
1244 |
msgstr ""
|
1245 |
|
1246 |
+
#: includes/settings/settings-ppec.php:492
|
1247 |
msgid "PayPal Credit logo used in the message."
|
1248 |
msgstr ""
|
1249 |
|
1250 |
+
#: includes/settings/settings-ppec.php:495
|
1251 |
msgid "Credit Messaging logo position"
|
1252 |
msgstr ""
|
1253 |
|
1254 |
+
#: includes/settings/settings-ppec.php:500
|
1255 |
msgid "Left"
|
1256 |
msgstr ""
|
1257 |
|
1258 |
+
#: includes/settings/settings-ppec.php:501
|
1259 |
msgid "Right"
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: includes/settings/settings-ppec.php:502
|
1263 |
msgid "Top"
|
1264 |
msgstr ""
|
1265 |
|
1266 |
+
#: includes/settings/settings-ppec.php:506
|
1267 |
msgid "Position of the PayPal logo in the message."
|
1268 |
msgstr ""
|
1269 |
|
1270 |
+
#: includes/settings/settings-ppec.php:509
|
1271 |
msgid "Credit Messaging text color"
|
1272 |
msgstr ""
|
1273 |
|
1274 |
+
#: includes/settings/settings-ppec.php:515
|
1275 |
+
#: includes/settings/settings-ppec.php:534
|
1276 |
msgid "White"
|
1277 |
msgstr ""
|
1278 |
|
1279 |
+
#: includes/settings/settings-ppec.php:516
|
1280 |
+
#: includes/settings/settings-ppec.php:531
|
1281 |
msgid "Monochrome"
|
1282 |
msgstr ""
|
1283 |
|
1284 |
+
#: includes/settings/settings-ppec.php:517
|
1285 |
+
#: includes/settings/settings-ppec.php:533
|
1286 |
msgid "Grayscale"
|
1287 |
msgstr ""
|
1288 |
|
1289 |
+
#: includes/settings/settings-ppec.php:521
|
1290 |
msgid "Text and logo color of the message."
|
1291 |
msgstr ""
|
1292 |
|
1293 |
+
#: includes/settings/settings-ppec.php:524
|
1294 |
msgid "Credit Messaging color"
|
1295 |
msgstr ""
|
1296 |
|
1297 |
+
#: includes/settings/settings-ppec.php:532
|
1298 |
msgid "Gray"
|
1299 |
msgstr ""
|
1300 |
|
1301 |
+
#: includes/settings/settings-ppec.php:535
|
1302 |
msgid "White no border"
|
1303 |
msgstr ""
|
1304 |
|
1305 |
+
#: includes/settings/settings-ppec.php:539
|
1306 |
msgid "Color of the message."
|
1307 |
msgstr ""
|
1308 |
|
1309 |
+
#: includes/settings/settings-ppec.php:542
|
1310 |
msgid "Credit Messaging ratio"
|
1311 |
msgstr ""
|
1312 |
|
1313 |
+
#: includes/settings/settings-ppec.php:547
|
1314 |
msgid "1x1"
|
1315 |
msgstr ""
|
1316 |
|
1317 |
+
#: includes/settings/settings-ppec.php:548
|
1318 |
msgid "1x4"
|
1319 |
msgstr ""
|
1320 |
|
1321 |
+
#: includes/settings/settings-ppec.php:549
|
1322 |
msgid "8x1"
|
1323 |
msgstr ""
|
1324 |
|
1325 |
+
#: includes/settings/settings-ppec.php:550
|
1326 |
msgid "20x1"
|
1327 |
msgstr ""
|
1328 |
|
1329 |
+
#: includes/settings/settings-ppec.php:554
|
1330 |
msgid "Shape and size of the message."
|
1331 |
msgstr ""
|
1332 |
|
1333 |
+
#: includes/settings/settings-ppec.php:569
|
1334 |
+
msgid "Enable on the cart page"
|
|
|
|
|
|
|
|
|
1335 |
msgstr ""
|
1336 |
|
1337 |
+
#: includes/settings/settings-ppec.php:572
|
1338 |
+
msgid "Enable PayPal Checkout buttons on the cart page"
|
1339 |
msgstr ""
|
1340 |
|
1341 |
+
#: includes/settings/settings-ppec.php:581
|
1342 |
msgid "Mini-cart Button Settings"
|
1343 |
msgstr ""
|
1344 |
|
1345 |
+
#: includes/settings/settings-ppec.php:587
|
1346 |
#: includes/settings/settings-ppec.php:624
|
1347 |
+
#: includes/settings/settings-ppec.php:657
|
1348 |
msgid "Configure Settings"
|
1349 |
msgstr ""
|
1350 |
|
1351 |
+
#: includes/settings/settings-ppec.php:588
|
1352 |
msgid "Configure settings specific to mini-cart"
|
1353 |
msgstr ""
|
1354 |
|
1355 |
+
#: includes/settings/settings-ppec.php:593
|
1356 |
#: includes/settings/settings-ppec.php:630
|
1357 |
+
#: includes/settings/settings-ppec.php:663
|
1358 |
msgid "Optionally override global button settings above and configure buttons for this context."
|
1359 |
msgstr ""
|
1360 |
|
1361 |
+
#: includes/settings/settings-ppec.php:609
|
1362 |
msgid "Single Product Button Settings"
|
1363 |
msgstr ""
|
1364 |
|
1365 |
+
#: includes/settings/settings-ppec.php:615
|
1366 |
+
msgid "Enable on the single product page"
|
|
|
1367 |
msgstr ""
|
1368 |
|
1369 |
+
#: includes/settings/settings-ppec.php:618
|
1370 |
+
msgid "Enable PayPal Checkout buttons on the single product page"
|
1371 |
msgstr ""
|
1372 |
|
1373 |
#: includes/settings/settings-ppec.php:625
|
1379 |
msgstr ""
|
1380 |
|
1381 |
#: includes/settings/settings-ppec.php:648
|
1382 |
+
msgid "Enable on the checkout page"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
#: includes/settings/settings-ppec.php:651
|
1386 |
+
msgid "Enable PayPal Checkout buttons on the regular checkout page"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
+
#: includes/settings/settings-ppec.php:658
|
|
|
|
|
|
|
|
|
1390 |
msgid "Configure settings specific to regular checkout"
|
1391 |
msgstr ""
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: woocommerce, automattic, woothemes, akeda, dwainm, royho, allendav, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, fullysupportedphil, dsmithweb, corsonr, bor0, zandyring, pauldechov, robobot3000, jorgeatorres, mattdallan, menakas, chickenn00dle, jamesgallan, achyuthajoy, codestor
|
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: 5.
|
6 |
Requires PHP: 5.5
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -102,6 +102,19 @@ Please use this to inform us about bugs, or make contributions via PRs.
|
|
102 |
|
103 |
== Changelog ==
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
= 2.1.1 - 2020-11-24 =
|
106 |
* Fix - Update the bundle.pem file to use the certificates from PayPal. PR#822
|
107 |
* Tweak - PHP 8.0 compatibility. PR#837
|
2 |
Contributors: woocommerce, automattic, woothemes, akeda, dwainm, royho, allendav, slash1andy, woosteve, spraveenitpro, mikedmoore, fernashes, shellbeezy, danieldudzic, mikaey, fullysupportedphil, dsmithweb, corsonr, bor0, zandyring, pauldechov, robobot3000, jorgeatorres, mattdallan, menakas, chickenn00dle, jamesgallan, achyuthajoy, codestor
|
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: 5.7
|
6 |
Requires PHP: 5.5
|
7 |
+
Stable tag: 2.1.2
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 2.1.2 - 2021-06-28 =
|
106 |
+
* Fix - Prevent fatal error when a line item isn't a WC_Product instance. PR#872
|
107 |
+
* Fix - [WC Subscriptions] Update the shipping packages address using a dynamic key rather than assuming a 0 index. PR#871
|
108 |
+
* New - Allow hiding of funding methods MercadoPago and BLIK. PR#870
|
109 |
+
* Tweak - Make labels/descriptions more consistent on the settings screen. PR#771
|
110 |
+
* Tweak - Make WooCommerce 3.2.0 explicit. PR#868
|
111 |
+
* Dev - Add hooks to alter names and descriptions of line items sent to PayPal. PR#869
|
112 |
+
* Fix - Create session cookie only when needed. PR#793, PR#845.
|
113 |
+
* Tweak - Mark as compatible with latest WordPress and WooCommerce. PR#867
|
114 |
+
* Fix - Replace jQuery 3.x deprecated functions. PR#852
|
115 |
+
* Fix - Honor shape settings when rendering buttons for alternative funding sources. PR#844
|
116 |
+
* New - Add notice on plugins page to upgrade to PayPal Payments. PR#866
|
117 |
+
|
118 |
= 2.1.1 - 2020-11-24 =
|
119 |
* Fix - Update the bundle.pem file to use the certificates from PayPal. PR#822
|
120 |
* Tweak - PHP 8.0 compatibility. PR#837
|
templates/paypal-payments-upgrade-notice.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Show PayPal Payments upgrade notice on plugins page
|
4 |
+
*
|
5 |
+
* @package woocommerce-paypal-express-checkout/templates
|
6 |
+
*/
|
7 |
+
|
8 |
+
|
9 |
+
// Generate Install / Activation / Config links.
|
10 |
+
$paypal_payments_path = 'woocommerce-paypal-payments/woocommerce-paypal-payments.php';
|
11 |
+
$paypal_payments_install_link = wp_nonce_url(
|
12 |
+
add_query_arg(
|
13 |
+
array(
|
14 |
+
'action' => 'install-plugin',
|
15 |
+
'plugin' => dirname( $paypal_payments_path ),
|
16 |
+
),
|
17 |
+
admin_url( 'update.php' )
|
18 |
+
),
|
19 |
+
'install-plugin_' . dirname( $paypal_payments_path )
|
20 |
+
);
|
21 |
+
|
22 |
+
$paypal_payments_activate_link = wp_nonce_url(
|
23 |
+
add_query_arg(
|
24 |
+
array(
|
25 |
+
'action' => 'activate',
|
26 |
+
'plugin' => $paypal_payments_path,
|
27 |
+
),
|
28 |
+
admin_url( 'plugins.php' )
|
29 |
+
),
|
30 |
+
'activate-plugin_' . $paypal_payments_path
|
31 |
+
);
|
32 |
+
?>
|
33 |
+
|
34 |
+
<tr class="plugin-update-tr active notice-warning notice-alt" id="ppec-migrate-notice">
|
35 |
+
<td colspan="4" class="plugin-update colspanchange">
|
36 |
+
<div class="update-message notice inline notice-warning notice-alt">
|
37 |
+
<div class='ppec-notice-title ppec-notice-section'>
|
38 |
+
<p>Upgrade to PayPal Payments: the best way to get paid with PayPal and WooCommerce</p>
|
39 |
+
</div>
|
40 |
+
<div class='ppec-notice-content ppec-notice-section'>
|
41 |
+
<p><strong>WooCommerce PayPal Payments</strong> is a full-stack solution that offers powerful and flexible payment processing capabilities. Expand your business by connecting with over 370+ million active PayPal accounts around the globe. With PayPal, you can sell in 200+ markets and accept 100+ currencies. Plus, PayPal can automatically identify customer locations and offer country-specific, local payment methods.</p>
|
42 |
+
|
43 |
+
<p>Upgrade now and get access to these great features:</p>
|
44 |
+
|
45 |
+
<ul>
|
46 |
+
<li>Give your customers their preferred ways to pay with one checkout solution. Accept <strong>PayPal</strong>, <strong>PayPal Credit</strong>, <strong>Pay Later</strong> options (available in the US, UK, France, and Germany), <strong>credit & debit cards</strong>, and country-specific, <strong>local payment methods</strong> on any device.</li>
|
47 |
+
<li>Offer subscriptions and accept recurring payments as PayPal is compatible with <a target="_blank" href="https://woocommerce.com/products/woocommerce-subscriptions/"><strong>WooCommerce Subscriptions</strong></a>.</li>
|
48 |
+
</ul>
|
49 |
+
</div>
|
50 |
+
<div class='ppec-notice-buttons ppec-notice-section hidden'>
|
51 |
+
<?php //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
52 |
+
<a id="ppec-install-paypal-payments" href="<?php echo $paypal_payments_install_link; ?>" class="button button-primary woocommerce-save-button">Upgrade to PayPal Payments now</a>
|
53 |
+
<?php //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
54 |
+
<a id="ppec-activate-paypal-payments" href="<?php echo $paypal_payments_activate_link; ?>" class="button button-primary woocommerce-save-button">Activate PayPal Payments now</a>
|
55 |
+
<a href="https://woocommerce.com/products/woocommerce-paypal-payments/" target="_blank" class="button woocommerce-save-button">Learn more</a>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
</td>
|
59 |
+
</tr>
|
woocommerce-gateway-paypal-express-checkout.php
CHANGED
@@ -3,16 +3,16 @@
|
|
3 |
* Plugin Name: WooCommerce PayPal Checkout Gateway
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
|
5 |
* Description: Accept all major credit and debit cards, plus Venmo and PayPal Credit in the US, presenting options in a customizable stack of payment buttons. Fast, seamless, and flexible.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com
|
9 |
-
* Copyright: ©
|
10 |
* License: GNU General Public License v3.0
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
12 |
* Text Domain: woocommerce-gateway-paypal-express-checkout
|
13 |
* Domain Path: /languages
|
14 |
-
* WC tested up to: 4
|
15 |
-
* WC requires at least: 2.
|
16 |
*/
|
17 |
/**
|
18 |
* Copyright (c) 2019 PayPal, Inc.
|
@@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
27 |
exit; // Exit if accessed directly
|
28 |
}
|
29 |
|
30 |
-
define( 'WC_GATEWAY_PPEC_VERSION', '2.1.
|
31 |
|
32 |
/**
|
33 |
* Return instance of WC_Gateway_PPEC_Plugin.
|
@@ -47,3 +47,19 @@ function wc_gateway_ppec() {
|
|
47 |
}
|
48 |
|
49 |
wc_gateway_ppec()->maybe_run();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: WooCommerce PayPal Checkout Gateway
|
4 |
* Plugin URI: https://woocommerce.com/products/woocommerce-gateway-paypal-express-checkout/
|
5 |
* Description: Accept all major credit and debit cards, plus Venmo and PayPal Credit in the US, presenting options in a customizable stack of payment buttons. Fast, seamless, and flexible.
|
6 |
+
* Version: 2.1.2
|
7 |
* Author: WooCommerce
|
8 |
* Author URI: https://woocommerce.com
|
9 |
+
* Copyright: © 2021 WooCommerce / PayPal.
|
10 |
* License: GNU General Public License v3.0
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
12 |
* Text Domain: woocommerce-gateway-paypal-express-checkout
|
13 |
* Domain Path: /languages
|
14 |
+
* WC tested up to: 5.4
|
15 |
+
* WC requires at least: 3.2.0
|
16 |
*/
|
17 |
/**
|
18 |
* Copyright (c) 2019 PayPal, Inc.
|
27 |
exit; // Exit if accessed directly
|
28 |
}
|
29 |
|
30 |
+
define( 'WC_GATEWAY_PPEC_VERSION', '2.1.2' );
|
31 |
|
32 |
/**
|
33 |
* Return instance of WC_Gateway_PPEC_Plugin.
|
47 |
}
|
48 |
|
49 |
wc_gateway_ppec()->maybe_run();
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Adds the WooCommerce Inbox option on plugin activation
|
53 |
+
*
|
54 |
+
* @since 2.1.2
|
55 |
+
*/
|
56 |
+
if ( ! function_exists( 'add_woocommerce_inbox_variant' ) ) {
|
57 |
+
function add_woocommerce_inbox_variant() {
|
58 |
+
$option = 'woocommerce_inbox_variant_assignment';
|
59 |
+
|
60 |
+
if ( false === get_option( $option, false ) ) {
|
61 |
+
update_option( $option, wp_rand( 1, 12 ) );
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
register_activation_hook( __FILE__, 'add_woocommerce_inbox_variant' );
|