Plugin Directory

Changeset 3399626


Ignore:
Timestamp:
11/20/2025 10:51:08 AM (4 months ago)
Author:
mailerlite
Message:

updated to 3.1.3

Location:
woo-mailerlite/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • woo-mailerlite/trunk/includes/WooMailerLiteService.php

    r3398682 r3399626  
    125125                ];
    126126
    127                 if (isset($checkoutData['language'])) {
    128                     $orderCustomer['subscriber_fields'] = [
    129                         'subscriber_language' => $checkoutData['language'],
    130                     ];
    131                 }
    132 
    133127
    134128                if (isset($checkoutData['subscriber_fields'])) {
     
    152146                );
    153147
     148                if (isset($checkoutData['language'])) {
     149                    $orderCustomer['subscriber_fields']['subscriber_language'] = $checkoutData['language'];
     150                    $orderCustomer['subscriber_fields']['language'] = $checkoutData['language'];
     151                }
    154152
    155153                $orderCart = [
  • woo-mailerlite/trunk/includes/controllers/WooMailerLiteOrderController.php

    r3398682 r3399626  
    7676                $subscribe = $cart->subscribe;
    7777            }
    78             if (WooMailerLiteOptions::get("settings.checkoutHidden")) {
     78            if (WooMailerLiteOptions::get("settings.checkoutHidden") || $order->get_meta('_woo_ml_subscribe')) {
    7979                $subscribe = true;
    8080            }
  • woo-mailerlite/trunk/includes/controllers/WooMailerLitePluginController.php

    r3377455 r3399626  
    7474    public function reloadCheckout()
    7575    {
    76         if (!function_exists('WC') || !is_object(WC()->session)) {
    77             return false;
     76        try {
     77            if (!function_exists('WC') || !is_object(WC()->session)) {
     78                return false;
     79            }
     80            if ($this->requestHas('ml_checkout')) {
     81                $raw = intval($this->request['ml_checkout']);
     82                $escaped = db()->esc_like($raw);
     83                $escaped = '%checkout_id":' . addcslashes($escaped, '%_') . '%';
     84                $cart = WooMailerLiteCart::where('data', 'like', $escaped)->first();
     85                if ($cart && $cart->exists()) {
     86                    $cartData = $cart->data;
     87                    unset($cartData['checkout_id']);
     88                    WC()->session->set('cart', $cartData);
     89                }
     90            }
     91        } catch (Throwable $e) {
     92            WooMailerLiteLog()->error('Error restoring cart from checkout ID: ' . $e->getMessage());
    7893        }
    79         if ($this->requestHas('ml_checkout')) {
    80             $cart = WooMailerLiteCart::where('data', 'like', '%'.$this->request['ml_checkout'].'%')->first();
    81             if ($cart && $cart->exists()) {
    82                 WC()->session->set('cart', $cart->data);
    83             }
    84         }
     94        return true;
    8595    }
    8696}
  • woo-mailerlite/trunk/readme.txt

    r3398682 r3399626  
    66Tested up to: 6.8.2
    77Requires PHP: 7.2.5
    8 Stable tag: 3.1.2
     8Stable tag: 3.1.3
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    8484
    8585== Changelog ==
     86= 3.1.3 (20th November 2025) =
     87* Security improvements
     88
    8689= 3.1.2 (19th November 2025) =
    8790* Bug fixes and performance improvements
  • woo-mailerlite/trunk/woo-mailerlite.php

    r3398682 r3399626  
    1616 * Plugin URI:        https://wordpress.org/plugins/woo-mailerlite/
    1717 * Description:       Official MailerLite integration for WooCommerce. Track sales and campaign ROI, import products details, automate emails based on purchases and seamlessly add your customers to your email marketing lists via WooCommerce's checkout process.
    18  * Version:           3.1.2
     18 * Version:           3.1.3
    1919 * Author:            MailerLite
    2020 * Author URI:        https://mailerlite.com
     
    4040 * Update when you release new versions.
    4141 */
    42 define( 'WOO_MAILERLITE_VERSION', '3.1.2' );
     42define( 'WOO_MAILERLITE_VERSION', '3.1.3' );
    4343
    4444define('WOO_MAILERLITE_ASYNC_JOBS', false);
Note: See TracChangeset for help on using the changeset viewer.