Plugin Directory

Changeset 3757857


Ignore:
Timestamp:
10/21/2026 07:26:01 AM (3 weeks ago)
Author:
walletup
Message:

6.3.6: correct edition labels and licence reminder; safer Stripe payment updates

Location:
wallet-up/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • wallet-up/trunk/readme.txt

    r3757748 r3757857  
    55Tested up to: 7.1
    66Requires PHP: 8.1
    7 Stable tag: 6.3.5
     7Stable tag: 6.3.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    … …  
    205205
    206206== Changelog ==
     207= 6.3.6 - October 21, 2026 =
     208* Improved (Pro): Orders are marked paid from Stripe only for live payments that cover the order total while your store takes live payments.
     209* Improved (Pro): Store pages stay fast while Apple Pay setup runs in the background.
     210* Improved: The Plugins screen labels the free and Pro editions correctly, whichever one is installed.
     211* Improved: The licence activation reminder appears only when your account holds a licence that is not active on this site, and names Pro correctly in every edition.
     212
    207213= 6.3.5 - October 20, 2026 =
    208214* Improved (Pro): The card payment form at WooCommerce checkout shows the test card notice only while Stripe is in test mode.
  • wallet-up/trunk/src/API/WebhookHandler.php

    r3757748 r3757857  
    481481            }
    482482
     483            if (!$isTestMode && empty($event->livemode)) {
     484                $this->errorHandler->log('Stripe webhook ignored: a test-mode event (' . $event->type . ') reached a store that takes live payments');
     485                $this->updateWebhookStatus($webhookId, 'completed', 200, microtime(true) - $startTime, 'Test-mode event ignored on a live store');
     486                return new WP_REST_Response(['success' => true, 'ignored' => 'test_mode_event'], 200);
     487            }
     488
    483489            $eventType = $event->type;
    484490            $object = $event->data->object;
    … …  
    606612        if ($orderKey && $order->get_order_key() !== $orderKey) {
    607613            $this->errorHandler->log("Stripe webhook: order key mismatch for order {$orderId}");
     614            return;
     615        }
     616
     617        $paidMinor = (int) ($paymentIntent->amount_received ?? $paymentIntent->amount ?? 0);
     618        $dueMinor = \WalletUpPro\Core\Payments\PaymentGatewayHandler::toMinorUnits((float) $order->get_total(), (string) $order->get_currency());
     619        $sameCurrency = strtolower((string) ($paymentIntent->currency ?? '')) === strtolower((string) $order->get_currency());
     620        if (!$order->is_paid() && (!$sameCurrency || $paidMinor < $dueMinor)) {
     621            $this->errorHandler->log("Stripe webhook: PaymentIntent {$paymentIntent->id} does not cover order {$orderId}; order left unpaid");
     622            /* translators: %s: Stripe PaymentIntent ID */
     623            $order->add_order_note(sprintf(esc_html__('Stripe reported a payment (PaymentIntent: %s) that does not match this order total, so the order was not marked as paid.', 'walletup'), $paymentIntent->id));
     624            $order->save();
    608625            return;
    609626        }
  • wallet-up/trunk/src/Core/Admin/AdminManager.php

    r3737515 r3757857  
    822822                        $name = \WalletUpPro\Core\Config\PaymentMethodsConfig::getMethodName($methodId);
    823823                        throw new Exception(esc_html(sprintf(
    824                             __('%s requires Wallet Up. The free version supports Cash App, PayPal, and Venmo.', 'walletup'),
    825                             $name
     824                            /* translators: 1: payment method name, 2: Pro product name */
     825                            __('%1$s requires %2$s. The free version supports Cash App, PayPal, and Venmo.', 'walletup'),
     826                            $name,
     827                            WALLET_UP_PRO_PRODUCT_NAME
    826828                        )));
    827829                    }
  • wallet-up/trunk/src/Core/Admin/CheckoutHandoff.php

    r3755663 r3757857  
    161161        switch ($kind) {
    162162            case self::ACTION_OWNED:
    163                 return __('Wallet Up is already licensed on this site, so no second purchase was started. You can change your plan or add sites here.', 'walletup');
     163                /* translators: %s: Pro product name */
     164                return sprintf(__('%s is already licensed on this site, so no second purchase was started. You can change your plan or add sites here.', 'walletup'), WALLET_UP_PRO_PRODUCT_NAME);
    164165            case 'connect':
    165166                return __('Choose an option below to continue. Your checkout opens right after.', 'walletup');
  • wallet-up/trunk/src/Core/Admin/NonprofitOffer.php

    r3752420 r3757857  
    416416        }
    417417        if (self::otherLicence()) {
    418             wp_send_json_error(['message' => __('This site already uses a Wallet Up licence. Reply to your approval email and we will move it to your lifetime licence and stop the old plan, so you are not charged again.', 'walletup'), 'activation' => 'existing'], 409);
     418            wp_send_json_error(['message' => /* translators: %s: Pro product name */ sprintf(__('This site already uses a %s licence. Reply to your approval email and we will move it to your lifetime licence and stop the old plan, so you are not charged again.', 'walletup'), WALLET_UP_PRO_PRODUCT_NAME), 'activation' => 'existing'], 409);
    419419        }
    420420        if (self::premiumCode()) {
  • wallet-up/trunk/src/Core/Admin/Notices/PremiumActivationNotice.php

    r3749800 r3757857  
    4040        $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
    4141        return strpos( $page, 'wallet-up' ) === 0;
     42    }
     43
     44    public static function unusedLicenceOnAccount( $fs ): bool {
     45        if ( ! is_object( $fs ) || ! method_exists( $fs, 'is_registered' ) || ! $fs->is_registered() ) {
     46            return false;
     47        }
     48        if ( ! method_exists( $fs, 'has_any_license' ) || ! $fs->has_any_license( false ) ) {
     49            return false;
     50        }
     51        return ! ( method_exists( $fs, 'has_active_valid_license' ) && $fs->has_active_valid_license() );
    4252    }
    4353
    … …  
    126136        <div class="notice notice-warning is-dismissible">
    127137            <p style="font-size:14px;line-height:1.6;margin:8px 0 4px;">
    128                 <strong><?php esc_html_e( 'Thanks for upgrading to Wallet Up!', 'walletup' ); ?></strong>
     138                <strong><?php /* translators: %s: Pro product name */ echo esc_html( sprintf( __( 'Thanks for upgrading to %s!', 'walletup' ), WALLET_UP_PRO_PRODUCT_NAME ) ); ?></strong>
    129139                <?php esc_html_e( 'Your purchase is confirmed. One step is left before the Pro features unlock: download the Pro version and install it from Plugins, Add New, Upload. Your license and all your settings carry over automatically.', 'walletup' ); ?>
    130140            </p>
    … …  
    146156        }
    147157
     158        if ( ! self::unusedLicenceOnAccount( $fs ) ) {
     159            return;
     160        }
     161
    148162        $activateUrl = ( is_object( $fs ) && method_exists( $fs, 'get_activation_url' ) ) ? $fs->get_activation_url() : self::SELF_SERVE_URL;
    149163        $dismissUrl = wp_nonce_url( add_query_arg( 'walletup_dismiss_activate_help', '1' ), 'walletup_dismiss_activate_help' );
    … …  
    151165        <div class="notice notice-info" style="border-left-color:#7c3aed;">
    152166            <p style="font-size:14px;line-height:1.6;margin:8px 0 4px;">
    153                 <strong><?php esc_html_e( 'Already purchased Wallet Up?', 'walletup' ); ?></strong>
    154                 <?php esc_html_e( 'If you bought Pro but still see the free version, your license just needs to be activated on this site. Activate it and get your Pro download in one place — no re-purchase needed.', 'walletup' ); ?>
     167                <strong><?php /* translators: %s: Pro product name */ echo esc_html( sprintf( __( 'Your %s licence is ready for this site.', 'walletup' ), WALLET_UP_PRO_PRODUCT_NAME ) ); ?></strong>
     168                <?php esc_html_e( 'Your account has a licence that is not active here yet. Activate it to unlock Pro and get the Pro download. There is nothing more to pay.', 'walletup' ); ?>
    155169            </p>
    156170            <p style="margin:8px 0 12px;">
  • wallet-up/trunk/src/Core/Admin/Notices/ProInstallModal.php

    r3679695 r3757857  
    8686
    8787                <p id="wup-pro-modal-body">
    88                     <?php esc_html_e( 'This site is still running the free version. Download Wallet Up and install it over this one to unlock your Pro features. Your licence, settings and payment methods all carry across.', 'walletup' ); ?>
     88                    <?php /* translators: %s: Pro product name */ echo esc_html( sprintf( __( 'This site is still running the free version. Download %s and install it over this one to unlock your Pro features. Your licence, settings and payment methods all carry across.', 'walletup' ), WALLET_UP_PRO_PRODUCT_NAME ) ); ?>
    8989                </p>
    9090
    … …  
    9898                    <?php if ( $downloadUrl ) : ?>
    9999                        <a class="wup-pro-modal__cta" href="<?php echo esc_url( $downloadUrl ); ?>" autofocus>
    100                             <?php esc_html_e( 'Download Wallet Up', 'walletup' ); ?>
     100                            <?php /* translators: %s: Pro product name */ echo esc_html( sprintf( __( 'Download %s', 'walletup' ), WALLET_UP_PRO_PRODUCT_NAME ) ); ?>
    101101                        </a>
    102102                    <?php endif; ?>
  • wallet-up/trunk/src/WooCommerce/Express/ApplePayDomain.php

    r3757748 r3757857  
    6161                return;
    6262            }
    63             $connect = class_exists('\\WalletUpPro\\Core\\Payments\\StripeConnect')
    64                 && \WalletUpPro\Core\Payments\StripeConnect::isActive();
    65             $signature = self::registrationSignature($domain, $connect);
    66             if ($signature === '' || get_option(self::REGISTERED_OPT) === $signature || get_transient(self::RETRY_PAUSE)) {
     63            if (get_transient(self::RETRY_PAUSE)) {
     64                return;
     65            }
     66            $status = self::connectStatus(is_admin() && !wp_doing_ajax());
     67            $connect = !empty($status['connected']) && !empty($status['charges_enabled']) && !empty($status['account_id']);
     68            $signature = self::registrationSignature($domain, $connect, $status);
     69            if ($signature === '' || get_option(self::REGISTERED_OPT) === $signature) {
    6770                return;
    6871            }
    … …  
    100103    }
    101104
    102     public static function registrationSignature(string $domain, bool $connect): string
     105    private static function connectStatus(bool $mayFetch): array
     106    {
     107        if (!class_exists('\\WalletUpPro\\Core\\Payments\\StripeConnect')) {
     108            return [];
     109        }
     110        return $mayFetch
     111            ? \WalletUpPro\Core\Payments\StripeConnect::getStatus()
     112            : \WalletUpPro\Core\Payments\StripeConnect::getCachedStatus();
     113    }
     114
     115    public static function registrationSignature(string $domain, bool $connect, array $status = []): string
    103116    {
    104117        if ($connect) {
    105             $status = \WalletUpPro\Core\Payments\StripeConnect::getStatus();
    106118            $account = (string) ($status['account_id'] ?? '');
    107119            return $account === '' ? '' : implode('|', [$domain, $account, \WalletUpPro\Core\Payments\StripeConnect::mode()]);
  • wallet-up/trunk/wallet-up-start.php

    r3757748 r3757857  
    2828    private function __construct() {
    2929        $this->ensurePluginFunctionsLoaded();
     30        if ( self::FREE_PLUGIN_BASENAME === plugin_basename( WALLET_UP_PRO_FILE ) ) {
     31            return;
     32        }
    3033        $this->deactivateFreeVersion();
    3134        add_filter(
    … …  
    136139}
    137140// which has the Plugin Name header — WooCommerce FeaturesUtil requires this
    138 define( 'WALLET_UP_PRO_VERSION', '6.3.5' );
     141define( 'WALLET_UP_PRO_VERSION', '6.3.6' );
     142define( 'WALLET_UP_PRO_PRODUCT_NAME', 'Wallet Up Pro' );
    139143define( 'WALLET_UP_IS_PRO_BUILD', false );
    140144define( 'WALLET_UP_PRO_FILE', dirname( __FILE__ ) . '/wallet-up.php' );
  • wallet-up/trunk/wallet-up.php

    r3757748 r3757857  
    55 * Plugin URI: https://walletup.app/
    66 * Author: WalletUp.app
    7  * Version: 6.3.5
     7 * Version: 6.3.6
    88 * Requires at least: 5.8
    99 * Tested up to: 7.1
Note: See TracChangeset for help on using the changeset viewer.