Plugin Directory

Changeset 3465610


Ignore:
Timestamp:
02/20/2026 09:44:36 AM (5 weeks ago)
Author:
wootro
Message:

v2.2.2 - Fix: Array to string conversion warnings in API error handling and shipping services debug logging

Location:
woot-ro/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • woot-ro/trunk/README.txt

    r3462605 r3465610  
    44Requires at least: 4.0
    55Tested up to: 6.9
    6 Stable tag: 2.2.1
     6Stable tag: 2.2.2
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    7878
    7979== Changelog ==
     80
     81= 2.2.2 =
     82* Fix: Resolved "Array to string conversion" warning in API error handling (class-woot-api.php)
     83* Fix: Resolved "Array to string conversion" warning in shipping services debug logging (class-woot-shipping-services.php)
    8084
    8185= 2.2.1 =
     
    179183== Upgrade Notice ==
    180184
     185= 2.2.2 =
     186* Fix: Resolved PHP warnings ("Array to string conversion") that could appear during shipping price quotation.
     187
    181188= 2.2.1 =
    182189* New: Add Woot shipping from admin order page with city/county dropdowns. Price rounding option. Debug logging for API troubleshooting.
  • woot-ro/trunk/includes/api/class-woot-api.php

    r3462605 r3465610  
    937937        if ($code !== 200) {
    938938            $body = json_decode($response_body, true);
    939             $error_message = isset($body['error']) ? $body['error'] : __('Failed to get prices.', 'woot-ro');
     939            $error_message = isset($body['error']) ? (is_array($body['error']) ? wp_json_encode($body['error']) : $body['error']) : __('Failed to get prices.', 'woot-ro');
    940940            self::log('[Quotation Error] HTTP ' . $code . ' - ' . $error_message, 'error');
    941941            return new WP_Error('api_error', $error_message);
  • woot-ro/trunk/includes/shipping/class-woot-shipping-services.php

    r3462605 r3465610  
    10001000
    10011001                if ($debug && $service_id) {
    1002                     $errors_str = !empty($errors) ? implode(', ', $errors) : 'none';
     1002                    $errors_str = !empty($errors) ? implode(', ', array_map(function($e) { return is_array($e) ? wp_json_encode($e) : $e; }, $errors)) : 'none';
    10031003                    error_log("Woot Quotation: Service $service_id - total: $final_total, errors: $errors_str");
    10041004                }
  • woot-ro/trunk/package.json

    r3462605 r3465610  
    11{
    22  "name": "woot-ro",
    3   "version": "2.2.1",
     3  "version": "2.2.2",
    44  "description": "Woot.ro - Romanian Couriers Integration for WooCommerce",
    55  "author": "Woot.ro <tehnic@woot.ro>",
  • woot-ro/trunk/woot.php

    r3462605 r3465610  
    1717 * Plugin URI:        https://woot.ro
    1818 * Description:       Integrates all popular couriers in Romania, providing a one-stop solution for all your delivery needs
    19  * Version:           2.2.1
     19 * Version:           2.2.2
    2020 * Author:            Woot.ro
    2121 * Author URI:        https://woot.ro
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define('WOOT_VERSION', '2.2.1');
     38define('WOOT_VERSION', '2.2.2');
    3939
    4040/**
Note: See TracChangeset for help on using the changeset viewer.