Plugin Directory

Changeset 3191344


Ignore:
Timestamp:
11/18/2024 02:32:39 PM (17 months ago)
Author:
seuroficial
Message:

v2.2.17

Location:
seur/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • seur/trunk/classes/class-seur-collections.php

    r3176965 r3191344  
    188188                'timeout'     => 45,
    189189                'httpversion' => '1.0',
    190                 'user-agent'  => 'WooCommerce',
     190                'user-agent'  => 'WooCommerce - Seur '.SEUR_OFFICIAL_VERSION,
    191191                'headers'     => array(
    192192                    'Content-Type'  => 'application/json;charset=UTF-8',
     
    246246            'timeout'     => 45,
    247247            'httpversion' => '1.0',
    248             'user-agent'  => 'WooCommerce',
     248            'user-agent'  => 'WooCommerce - Seur '.SEUR_OFFICIAL_VERSION,
    249249            'headers'     => $headers,
    250250            'body'        => $data,
  • seur/trunk/classes/class-seur-global.php

    r3183810 r3191344  
    217217                'timeout'     => 45,
    218218                'httpversion' => '1.0',
    219                 'user-agent'  => 'WooCommerce',
     219                'user-agent'  => 'WooCommerce - Seur '.SEUR_OFFICIAL_VERSION,
    220220                'headers'     => array(
    221221                    'Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8',
  • seur/trunk/classes/class-seur-seguimiento.php

    r3176965 r3191344  
    175175function getStatusExpedition($eventCode) {
    176176    global $wpdb;
    177     $tabla  = $wpdb->prefix . 'seur_status';
    178177    $result = $wpdb->get_results($wpdb->prepare(
    179         "SELECT * FROM %s WHERE cod_situ = %s",
    180         [$tabla, $eventCode]));
     178        "SELECT * FROM {$wpdb->prefix}seur_status WHERE cod_situ = %s",
     179        [$eventCode]));
    181180    return $result ? (array)$result[0] : [];
    182181}
     
    196195    global $wpdb;
    197196    $order_id = get_post_meta( $label_id, '_seur_shipping_order_id', true);
    198     $tabla  = $wpdb->prefix . 'wc_order_stats';
    199197    if ($expeditionStatusKey = getExpeditionStatusKey($expeditionStatus)) {
    200198        $wpdb->query($wpdb->prepare(
    201             "UPDATE %s SET status=%s WHERE order_id = %d",
    202             [$tabla, $expeditionStatusKey, $order_id])
     199            "UPDATE {$wpdb->prefix}wc_order_stats SET status=%s WHERE order_id = %d",
     200            [$expeditionStatusKey, $order_id])
    203201        );
    204202        $order = wc_get_order($order_id);
    205203        $order->update_status($expeditionStatusKey);
     204        update_post_meta( $label_id, '_seur_shipping_tracking_state_name', $expeditionStatus );
    206205    }
    207206    return false;
  • seur/trunk/core/labels-cpt/labels-cpt.php

    r3176965 r3191344  
    105105 * @param int $order_id get order tracking by Order ID.
    106106 */
    107 function seur_get_order_tracking( $order_id ) {
     107function seur_get_label_tracking( $label_id ) {
    108108
    109109    if ( seur()->log_is_acive() ) {
    110         seur()->slog( 'seur_get_order_tracking( $order_id )' );
    111         seur()->slog( '$order_id: ', $order_id ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
     110        seur()->slog( 'seur_get_label_tracking( $label_id )' );
     111        seur()->slog( '$label_id: ', $label_id ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
    112112    }
    113113
    114     $order = seur_get_order($order_id);
    115     $order_tracking = $order->get_meta( '_seur_shipping_tracking_state', true );
     114    $label_tracking = get_post_meta( $label_id, '_seur_shipping_tracking_state', true );
     115    $label_tracking_name = get_post_meta( $label_id, '_seur_shipping_tracking_state_name', true );
    116116
    117117    if ( seur()->log_is_acive() ) {
    118         seur()->slog( '$order_tracking: ' . $order_tracking );
     118        seur()->slog( '$label_tracking: ' . $label_tracking );
    119119    }
    120120
    121     if ( ! empty( $order_tracking ) ) {
    122         return '<br />' . $order_tracking;
     121    if (! empty( $label_tracking_name ) ) {
     122        return $label_tracking_name;
     123    }
     124    if ( ! empty( $label_tracking ) ) {
     125        return $label_tracking;
    123126    }
    124127    return __( 'Waiting Collection', 'seur' );
     
    159162            break;
    160163        case 'seur-tracking':
    161             echo esc_html( seur_get_order_tracking( $order_id ) );
     164            echo esc_html( seur_get_label_tracking( $label_id ) );
    162165            break;
    163166        case 'weight':
  • seur/trunk/core/pages/seur-get-labels.php

    r3176965 r3191344  
    106106        if ( 'yes' !== $has_label ) {
    107107            $label = seur_api_get_label( $order_id, $numpackages, $weight, true, $changeService );
    108             $new_status = seur_after_get_label();
    109             seur_api_set_label_result( $order_id, $label, $new_status);
    110 
    111108            if ( $label['status'] ) {
     109                $new_status = seur_after_get_label();
     110                seur_api_set_label_result( $order_id, $label, $new_status);
    112111                echo esc_html__( 'Label dowloaded, the Label ID is ', 'seur' ) . esc_html( seur_api_get_label_ids($label, true) );
    113112                ?>
  • seur/trunk/core/tracking/back/tracking-back.php

    r3119152 r3191344  
    137137
    138138    $shipmentStatus = $state['description'];
    139     updateShipmentStatus($label_id, $shipmentStatus);
    140 
     139    if (isset($shipmentStatus) && !empty($shipmentStatus)) {
     140        updateShipmentStatus($label_id, $shipmentStatus);
     141    }
    141142    $eventCode = $state['eventCode'];
    142143    $expeditionStatus = getStatusExpedition($eventCode);
  • seur/trunk/loader.php

    r3183810 r3191344  
    44 * Plugin URI: http://www.seur.com/
    55 * Description: Add SEUR shipping method to WooCommerce. The SEUR plugin for WooCommerce allows you to manage your order dispatches in a fast and easy way
    6  * Version: 2.2.16
     6 * Version: 2.2.17
    77 * Author: SEUR Oficial
    88 * Author URI: http://www.seur.com/
     
    2020use Automattic\WooCommerce\Utilities\FeaturesUtil;
    2121
    22 define( 'SEUR_OFFICIAL_VERSION', '2.2.16' );
     22define( 'SEUR_OFFICIAL_VERSION', '2.2.17' );
    2323define( 'SEUR_DB_VERSION', '1.0.4' );
    2424define( 'SEUR_TABLE_VERSION', '1.0.5' );
  • seur/trunk/readme.txt

    r3183820 r3191344  
    44Requires at least: 4.0
    55Tested up to: 6.6.2
    6 Stable tag: 2.2.16
     6Stable tag: 2.2.17
    77WC requires at least: 3.0
    88WC tested up to: 9.1.4
     
    3939= Quick set-up =
    4040
    41 [Leave your details here](https://pub.s7.exacttarget.com/thi131hffjt). Ask SEUR for your registration details, fill in the configuration form and set the transport rate for your buyers. Trust your shipments to the leading e-commerce logistics partner in just 3 steps.
     41[Leave your details here](https://info.notificaciones.e-seur.com/Formulario-Web-Seur). Ask SEUR for your registration details, fill in the configuration form and set the transport rate for your buyers. Trust your shipments to the leading e-commerce logistics partner in just 3 steps.
    4242
    4343
     
    8484= What is the cargo manifest and how can I generate it? =
    8585
    86 The cargo manifest is a record of the packages given to our SEUR agent for delivery; this document can be downloaded in the "Manifest" section via the SEUR menu. Remember to print two copies: one for you and one for the driver.
     86The cargo manifest is a record of the packages given to our SEUR agent for delivery; this document can be downloaded in the "SEUR > Shipments" section via the SEUR menu. Remember to print two copies: one for you and one for the driver.
    8787
    8888= How can I track my Shipments? =
     
    9393
    9494== Changelog ==
     95
     96== 2.2.17 ==
     97
     98* FIXED: Tracking status update
    9599
    96100== 2.2.16 ==
Note: See TracChangeset for help on using the changeset viewer.