Plugin Directory

Changeset 3487151


Ignore:
Timestamp:
03/20/2026 11:16:48 AM (2 weeks ago)
Author:
easypayment
Message:

tags/9.0.59

Location:
woo-paypal-gateway
Files:
1068 added
6 edited

Legend:

Unmodified
Added
Removed
  • woo-paypal-gateway/trunk/languages/woo-paypal-gateway.pot

    r3486327 r3487151  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Payment Gateway for PayPal on WooCommerce 9.0.58\n"
     5"Project-Id-Version: Payment Gateway for PayPal on WooCommerce 9.0.59\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woo-paypal-gateway\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • woo-paypal-gateway/trunk/ppcp/includes/class-ppcp-paypal-checkout-for-woocommerce-request.php

    r3486327 r3487151  
    189189
    190190    private function ppcp_validate_order_for_capture($paypal_order_id, $woo_order_id = 0) {
     191        // First check session status to avoid unnecessary API call
     192        $session_data   = ppcp_get_paypal_order_session_data();
     193        $session_status = ! empty( $session_data['status'] ) ? strtoupper( $session_data['status'] ) : '';
     194
     195        if ( $session_status === 'APPROVED' || $session_status === 'CAPTURE' ) {
     196            $this->ppcp_set_order_session_data( $paypal_order_id, 'approved', $woo_order_id );
     197            return true;
     198        }
     199
     200        // Fall back to live API check
    191201        $order_details = $this->ppcp_get_checkout_details($paypal_order_id);
    192202        $paypal_status = is_object($order_details) && !empty($order_details->status) ? strtoupper($order_details->status) : '';
    193203
    194         if ($paypal_status !== 'APPROVED') {
     204        if ( $paypal_status !== 'APPROVED' && $paypal_status !== 'COMPLETED' ) {
    195205            $this->ppcp_log('Capture skipped. PayPal order is not approved. Current status: ' . $paypal_status);
    196206            if (function_exists('wc_add_notice')) {
     
    33213331            // Check if we have the necessary session data
    33223332            $reference_id    = ppcp_get_session('ppcp_reference_id');
    3323             $paypal_order_id = $this->ppcp_get_paypal_order_id_from_session();
     3333            $session_data    = ppcp_get_paypal_order_session_data();
     3334            $paypal_order_id = ! empty( $session_data['id'] ) ? $session_data['id'] : '';
    33243335
    33253336            if (empty($reference_id) || empty($paypal_order_id)) {
  • woo-paypal-gateway/trunk/ppcp/public/class-ppcp-paypal-checkout-for-woocommerce-button-manager.php

    r3486327 r3487151  
    32473247            }
    32483248
    3249             // Keep original behavior: update PayPal order from cart
    3250             $this->request->ppcp_update_order_from_cart();
     3249            // Only update PayPal order if an active session exists
     3250            $reference_id    = ppcp_get_session('ppcp_reference_id');
     3251            $session_data    = ppcp_get_paypal_order_session_data();
     3252            $paypal_order_id = ! empty( $session_data['id'] ) ? $session_data['id'] : '';
     3253
     3254            if ( ! empty( $reference_id ) && ! empty( $paypal_order_id ) ) {
     3255                $this->request->ppcp_update_order_from_cart();
     3256            }
    32513257
    32523258            wp_send_json_success( 'Address is valid' );
  • woo-paypal-gateway/trunk/ppcp/public/js/ppcp-paypal-checkout-for-woocommerce-public.js

    r3486327 r3487151  
    22    class PPCPManager {
    33        constructor(ppcp_manager) {
    4             // 9.0.58
     4            // 9.0.59
    55            this.ppcp_manager = ppcp_manager;
    66            this.productAddToCart = true;
  • woo-paypal-gateway/trunk/readme.txt

    r3486327 r3487151  
    44Requires at least: 3.3 
    55Tested up to: 6.9.4
    6 Stable tag: 9.0.58
     6Stable tag: 9.0.59
    77Requires PHP: 7.4 
    88License: GPLv3 
     
    102102== Changelog ==
    103103
     104= 9.0.59 - 2026-03-20 =
     105* Fixed PayPal order capture skipped and shipping address update not applied due to session status race condition during express checkout flow.
     106
    104107= 9.0.58 - 2026-03-19 =
    105108* Added - Settings to configure Authorized Order Status and Capture Order Statuses for better control over PayPal payment flow.
  • woo-paypal-gateway/trunk/woo-paypal-gateway.php

    r3486327 r3487151  
    66 * Plugin URI:        https://profiles.wordpress.org/easypayment
    77 * Description:       PayPal, Credit/Debit Cards, Google Pay, Apple Pay, Pay Later, Venmo, SEPA, iDEAL, Mercado Pago, Sofort, Bancontact & more - by an official PayPal Partner
    8  * Version:           9.0.58
     8 * Version:           9.0.59
    99 * Author:            easypayment
    1010 * Author URI:        https://profiles.wordpress.org/easypayment/
     
    2626
    2727if (!defined('WPG_PLUGIN_VERSION')) {
    28     define('WPG_PLUGIN_VERSION', '9.0.58');
     28    define('WPG_PLUGIN_VERSION', '9.0.59');
    2929}
    3030if (!defined('WPG_PLUGIN_PATH')) {
Note: See TracChangeset for help on using the changeset viewer.