Plugin Directory

Changeset 3353744


Ignore:
Timestamp:
09/01/2025 09:08:04 AM (7 months ago)
Author:
thegeneration
Message:

Tagging version 3.3.4

Location:
svea-checkout-for-woocommerce
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • svea-checkout-for-woocommerce/tags/3.3.4/inc/Compat/WC_Subscriptions_Compat.php

    r3264850 r3353744  
    11<?php
     2
    23namespace Svea_Checkout_For_Woocommerce\Compat;
     4
     5use function Svea_Checkout_For_Woocommerce\svea_checkout;
    36
    47if ( ! defined( 'ABSPATH' ) ) {
     
    1619        add_filter( 'woocommerce_sco_create_recurring_order', [ $this, 'add_retry_number_to_client_order_number' ], 10, 2 );
    1720        add_action( 'woocommerce_sco_validation_after', [ $this, 'remove_item_meta_for_subscription' ] );
     21        add_action( 'woocommerce_checkout_before_order_review', [ $this, 'maybe_remove_recipient_shipping_notice' ] );
     22    }
     23
     24    /**
     25     * Maybe remove recipient shipping notice
     26     *
     27     * This notice is unnecessary for Svea Checkout since it handles shipping information differently.
     28     * WooCommerce Subscriptions adds it just below the shipping information fields to tell the user that they should
     29     * enter the recipient's shipping information and not their own. Since WooCommerce Subscriptions hides this with JS
     30     * based on that it's placed inside "woocommerce-shipping-fields" it is not hidden when it is displayed in our
     31     * template.
     32     *
     33     * @return void
     34     */
     35    public function maybe_remove_recipient_shipping_notice() {
     36        if ( svea_checkout()->template_handler->is_svea() && ! wp_doing_ajax() && class_exists( 'WCSG_Checkout' ) ) {
     37            remove_action(
     38                'woocommerce_before_checkout_shipping_form',
     39                [
     40                    'WCSG_Checkout',
     41                    'maybe_display_recipient_shipping_notice',
     42                ],
     43                10
     44            );
     45        }
    1846    }
    1947
  • svea-checkout-for-woocommerce/tags/3.3.4/inc/Webhook_Handler.php

    r3320402 r3353744  
    417417        }
    418418
     419        if ( ! is_numeric( $this->svea_order_id ) ) {
     420            $this->gateway::log( sprintf( 'Invalid Svea order ID: %s', $this->svea_order_id ) );
     421            status_header( 400 );
     422            esc_html_e( 'Invalid Svea order ID', 'svea-checkout-for-woocommerce' );
     423            die;
     424        }
     425
    419426        if ( $this->gateway->get_option( 'use_ip_restriction' ) === 'yes' ) {
    420427            $this->validate_referer();
  • svea-checkout-for-woocommerce/tags/3.3.4/readme.txt

    r3328213 r3353744  
    1010License: Apache 2.0
    1111License URI: https://www.apache.org/licenses/LICENSE-2.0
    12 Stable tag: 3.3.3
     12Stable tag: 3.3.4
    1313
    1414Supercharge your WooCommerce Store with powerful features to pay via Svea Checkout!
     
    9191== Upgrade Notice ==
    9292
     93= 3.3.4 =
     943.3.4 is a patch release
     95
    9396= 3.3.3 =
    94973.3.3 is a patch release
     
    393396
    394397== Changelog ==
     398
     399= 3.3.4 2025-09-01 =
     400- Hide WooCommerce Subscriptions gift delivery notice since it was shown even though the gift functionality was turned off.
     401- Add failsafe check on order ID in webhook handler preventing errors when a non numeric order ID is sent.
    395402
    396403= 3.3.3 2025-07-15 =
  • svea-checkout-for-woocommerce/tags/3.3.4/svea-checkout-for-woocommerce.php

    r3328213 r3353744  
    1414 * Plugin URI: https://wordpress.org/plugins/svea-checkout-for-woocommerce/
    1515 * Description: Process payments in WooCommerce via Svea Checkout.
    16  * Version: 3.3.3
     16 * Version: 3.3.4
    1717 * Requires Plugins: woocommerce
    1818 * Author: The Generation AB
     
    4747         * Version of plugin
    4848         */
    49         const VERSION = '3.3.3';
     49        const VERSION = '3.3.4';
    5050
    5151        /**
  • svea-checkout-for-woocommerce/trunk/inc/Compat/WC_Subscriptions_Compat.php

    r3264850 r3353744  
    11<?php
     2
    23namespace Svea_Checkout_For_Woocommerce\Compat;
     4
     5use function Svea_Checkout_For_Woocommerce\svea_checkout;
    36
    47if ( ! defined( 'ABSPATH' ) ) {
     
    1619        add_filter( 'woocommerce_sco_create_recurring_order', [ $this, 'add_retry_number_to_client_order_number' ], 10, 2 );
    1720        add_action( 'woocommerce_sco_validation_after', [ $this, 'remove_item_meta_for_subscription' ] );
     21        add_action( 'woocommerce_checkout_before_order_review', [ $this, 'maybe_remove_recipient_shipping_notice' ] );
     22    }
     23
     24    /**
     25     * Maybe remove recipient shipping notice
     26     *
     27     * This notice is unnecessary for Svea Checkout since it handles shipping information differently.
     28     * WooCommerce Subscriptions adds it just below the shipping information fields to tell the user that they should
     29     * enter the recipient's shipping information and not their own. Since WooCommerce Subscriptions hides this with JS
     30     * based on that it's placed inside "woocommerce-shipping-fields" it is not hidden when it is displayed in our
     31     * template.
     32     *
     33     * @return void
     34     */
     35    public function maybe_remove_recipient_shipping_notice() {
     36        if ( svea_checkout()->template_handler->is_svea() && ! wp_doing_ajax() && class_exists( 'WCSG_Checkout' ) ) {
     37            remove_action(
     38                'woocommerce_before_checkout_shipping_form',
     39                [
     40                    'WCSG_Checkout',
     41                    'maybe_display_recipient_shipping_notice',
     42                ],
     43                10
     44            );
     45        }
    1846    }
    1947
  • svea-checkout-for-woocommerce/trunk/inc/Webhook_Handler.php

    r3320402 r3353744  
    417417        }
    418418
     419        if ( ! is_numeric( $this->svea_order_id ) ) {
     420            $this->gateway::log( sprintf( 'Invalid Svea order ID: %s', $this->svea_order_id ) );
     421            status_header( 400 );
     422            esc_html_e( 'Invalid Svea order ID', 'svea-checkout-for-woocommerce' );
     423            die;
     424        }
     425
    419426        if ( $this->gateway->get_option( 'use_ip_restriction' ) === 'yes' ) {
    420427            $this->validate_referer();
  • svea-checkout-for-woocommerce/trunk/readme.txt

    r3328213 r3353744  
    1010License: Apache 2.0
    1111License URI: https://www.apache.org/licenses/LICENSE-2.0
    12 Stable tag: 3.3.3
     12Stable tag: 3.3.4
    1313
    1414Supercharge your WooCommerce Store with powerful features to pay via Svea Checkout!
     
    9191== Upgrade Notice ==
    9292
     93= 3.3.4 =
     943.3.4 is a patch release
     95
    9396= 3.3.3 =
    94973.3.3 is a patch release
     
    393396
    394397== Changelog ==
     398
     399= 3.3.4 2025-09-01 =
     400- Hide WooCommerce Subscriptions gift delivery notice since it was shown even though the gift functionality was turned off.
     401- Add failsafe check on order ID in webhook handler preventing errors when a non numeric order ID is sent.
    395402
    396403= 3.3.3 2025-07-15 =
  • svea-checkout-for-woocommerce/trunk/svea-checkout-for-woocommerce.php

    r3328213 r3353744  
    1414 * Plugin URI: https://wordpress.org/plugins/svea-checkout-for-woocommerce/
    1515 * Description: Process payments in WooCommerce via Svea Checkout.
    16  * Version: 3.3.3
     16 * Version: 3.3.4
    1717 * Requires Plugins: woocommerce
    1818 * Author: The Generation AB
     
    4747         * Version of plugin
    4848         */
    49         const VERSION = '3.3.3';
     49        const VERSION = '3.3.4';
    5050
    5151        /**
Note: See TracChangeset for help on using the changeset viewer.