Plugin Directory

Changeset 3470490


Ignore:
Timestamp:
02/26/2026 04:24:26 PM (5 weeks ago)
Author:
meliconnect
Message:

Update trunk to version 1.6.2

Location:
meliconnect/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • meliconnect/trunk/includes/Core/ApiManager.php

    r3453301 r3470490  
    6161        $meli_listing_id = sanitize_text_field( $request->get_param( 'meli_listing_id' ) );
    6262        $seller_id  = sanitize_text_field( $request->get_param( 'seller_id' ) );
     63        $topic      = sanitize_text_field( $request->get_param( 'topic' ) );
    6364
    6465        Helper::logData(
    6566            sprintf(
    66                 'Sync product request: listing=%s seller=%s',
     67                'Sync product callback received: listing=%s seller=%s topic=%s',
    6768                $meli_listing_id,
    68                 $seller_id
     69                $seller_id,
     70                $topic
    6971            ),
    7072            'sync_product_callback'
     
    7880            );
    7981        }
     82
     83        $productTopics = [
     84            'items',
     85            'items_prices',
     86            'prices',
     87            'user-products-families',
     88        ];
     89
     90        $isOrderTopic   = $topic === 'orders_v2';
     91        $isProductTopic = in_array( $topic, $productTopics, true );
     92
     93        if ( ! $isOrderTopic && ! $isProductTopic ) {
     94            Helper::logData(
     95                'Sync skipped: unsupported topic ' . $topic,
     96                'sync_product_callback'
     97            );
     98
     99            return rest_ensure_response([
     100                'success' => true,
     101                'skipped' => true,
     102                'reason'  => 'unsupported_topic',
     103            ]);
     104        }
     105
     106
     107        $syncOptions = Helper::getMeliconnectOptions( 'sync' );
     108
     109        $autoSyncEnabled = ( $syncOptions['meliconnect_sync_enable_auto_sync'] ?? 'false' ) === 'true';
     110
     111        if ( ! $autoSyncEnabled ) {
     112            Helper::logData(
     113                sprintf(
     114                    'Sync skipped by settings: topic=%s auto=%s',
     115                    $topic,
     116                    $autoSyncEnabled ? 'true' : 'false'
     117                ),
     118                'sync_product_callback'
     119            );
     120
     121            return rest_ensure_response([
     122                'success' => true,
     123                'skipped' => true,
     124                'reason'  => 'auto_sync_disabled',
     125            ]);
     126        }
     127
     128        if ( $isOrderTopic ) {
     129            $syncOrders = ( $syncOptions['meliconnect_sync_on_orders'] ?? 'false' ) === 'true';
     130
     131            if ( ! $syncOrders ) {
     132                Helper::logData( 'Sync skipped by settings: topic=orders_v2', 'sync_product_callback' );
     133               
     134                return rest_ensure_response([
     135                    'success' => true,
     136                    'skipped' => true,
     137                    'reason'  => 'order_sync_disabled',
     138                ]);
     139            }
     140        }
     141
     142        if ( $isProductTopic ) {
     143            $syncProducts = ( $syncOptions['meliconnect_sync_on_product_changes'] ?? 'false' ) === 'true';
     144
     145            if ( ! $syncProducts ) {
     146
     147                Helper::logData(
     148                    'Sync skipped by settings: topic=' . $topic,
     149                    'sync_product_callback'
     150                );
     151               
     152                return rest_ensure_response([
     153                    'success' => true,
     154                    'skipped' => true,
     155                    'reason'  => 'product_sync_disabled',
     156                ]);
     157            }
     158        }
     159
     160
    80161
    81162        try {
  • meliconnect/trunk/includes/Core/Controllers/SettingController.php

    r3457358 r3470490  
    277277
    278278
    279     public static function handleSaveSyncSettings() {
    280         if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'ajax_settings_nonce' ) ) {
    281             wp_send_json_error( array( 'message' => 'Nonce verification failed.' ) );
    282             wp_die();
    283         }
    284 
    285         // Verifica permisos
    286         if ( ! current_user_can( 'meliconnect_manage_plugin' ) ) {
    287             wp_send_json_error( esc_html__( 'You do not have permission to perform this action', 'meliconnect' ) );
    288             return;
    289         }
    290 
    291         $data = array();
    292 
    293         // Cron status: solo "active" o "inactive"
    294         $allowed_status                       = array( 'active', 'inactive' );
    295         $data['meliconnect_sync_cron_status'] = ( isset( $_POST['meliconnect_sync_cron_status'] ) && in_array( $_POST['meliconnect_sync_cron_status'], $allowed_status, true ) )
    296         ? sanitize_text_field( wp_unslash( $_POST['meliconnect_sync_cron_status'] ) )
    297         : 'inactive';
    298 
    299         // Items batch: número entero
    300         $data['meliconnect_sync_cron_items_batch'] = isset( $_POST['meliconnect_sync_cron_items_batch'] )
    301         ? intval( $_POST['meliconnect_sync_cron_items_batch'] )
    302         : 10;
    303 
    304         // Frecuencia: número entero (mínimo 1)
    305         $data['meliconnect_sync_cron_frecuency_minutes'] = isset( $_POST['meliconnect_sync_cron_frecuency_minutes'] )
    306         ? max( 1, intval( $_POST['meliconnect_sync_cron_frecuency_minutes'] ) )
    307         : 10;
    308 
    309         // Método: solo "WordPress" o "custom"
    310         $allowed_methods                      = array( 'wordpress', 'custom' );
    311         $data['meliconnect_sync_cron_method'] = ( isset( $_POST['meliconnect_sync_cron_method'] ) && in_array( $_POST['meliconnect_sync_cron_method'], $allowed_methods, true ) )
    312         ? sanitize_text_field( wp_unslash( $_POST['meliconnect_sync_cron_method'] ) )
    313         : 'WordPress';
    314 
    315         // Checkboxes individuales (se guardan como "true"/"false")
    316         $checkboxes = array(
    317             'meliconnect_sync_stock_woo_to_meli',
    318             'meliconnect_sync_price_woo_to_meli',
    319             'meliconnect_sync_status_woo_to_meli',
    320             'meliconnect_sync_stock_meli_to_woo',
    321             'meliconnect_sync_price_meli_to_woo',
    322             'meliconnect_sync_variations_price_meli_to_woo',
    323         );
    324 
    325         foreach ( $checkboxes as $cb ) {
    326             $data[ $cb ] = ( isset( $_POST[ $cb ] ) && 'true' === $_POST[ $cb ] ) ? 'true' : 'false';
    327         }
    328 
    329         // Guardar en opciones (ejemplo)
    330         foreach ( $data as $key => $value ) {
    331             update_option( $key, $value );
    332         }
    333 
    334         wp_send_json_success(
    335             array(
    336                 'message' => __( 'Sync settings saved successfully.', 'meliconnect' ),
    337                 'data'    => $data,
    338             )
    339         );
    340     }
     279    public static function handleSaveSyncSettings() {
     280
     281        // Nonce
     282        if (
     283            ! isset( $_POST['nonce'] ) ||
     284            ! wp_verify_nonce(
     285                sanitize_text_field( wp_unslash( $_POST['nonce'] ) ),
     286                'ajax_settings_nonce'
     287            )
     288        ) {
     289            wp_send_json_error( array( 'message' => 'Nonce verification failed.' ) );
     290            wp_die();
     291        }
     292
     293        // Permisos
     294        if ( ! current_user_can( 'meliconnect_manage_plugin' ) ) {
     295            wp_send_json_error(
     296                esc_html__( 'You do not have permission to perform this action', 'meliconnect' )
     297            );
     298            wp_die();
     299        }
     300
     301        $data = array();
     302
     303        /**
     304         * Automatic sync master switch
     305         */
     306        $data['meliconnect_sync_enable_auto_sync'] =
     307            ( isset( $_POST['meliconnect_sync_enable_auto_sync'] ) && 'true' === $_POST['meliconnect_sync_enable_auto_sync'] )
     308                ? 'true'
     309                : 'false';
     310
     311        /**
     312         * Process order callbacks
     313         */
     314        $data['meliconnect_sync_on_orders'] =
     315            ( isset( $_POST['meliconnect_sync_on_orders'] ) && 'true' === $_POST['meliconnect_sync_on_orders'] )
     316                ? 'true'
     317                : 'false';
     318
     319        /**
     320         * Process product change callbacks
     321         */
     322        $data['meliconnect_sync_on_product_changes'] =
     323            ( isset( $_POST['meliconnect_sync_on_product_changes'] ) && 'true' === $_POST['meliconnect_sync_on_product_changes'] )
     324                ? 'true'
     325                : 'false';
     326
     327        /**
     328         * Guardar opciones
     329         */
     330        foreach ( $data as $key => $value ) {
     331            update_option( $key, $value );
     332        }
     333
     334        wp_send_json_success(
     335            array(
     336                'message' => esc_html__( 'Sync settings saved successfully.', 'meliconnect' ),
     337                'data'    => $data,
     338            )
     339        );
     340    }
    341341
    342342
  • meliconnect/trunk/includes/Core/CronManager.php

    r3457358 r3470490  
    106106            add_action( $this->import_hook, array( $this, 'processImportTasks' ) );
    107107            add_action( $this->export_hook, array( $this, 'processExportTasks' ) );
    108             add_action( $this->sync_hook, array( $this, 'processSyncTasks' ) );
     108            //add_action( $this->sync_hook, array( $this, 'processSyncTasks' ) );
    109109            add_action( $this->import_custom_hook, array( $this, 'processUserCustomImport' ) );
    110110            add_action( $this->export_custom_hook, array( $this, 'processUserCustomExport' ) );
  • meliconnect/trunk/includes/Core/Initialize.php

    r3457358 r3470490  
    141141            'meliconnect_import_attrs'                   => false,
    142142
     143            /* OLD to delete */
    143144            'meliconnect_sync_cron_status'               => 'deactive',
    144145            'meliconnect_sync_cron_items_batch'          => 10,
    145146            'meliconnect_sync_cron_frecuency_minutes'    => 10,
    146147            'meliconnect_sync_cron_method'               => 'wordpress',
    147             'meliconnect_sync_stock_woo_to_meli'         => false,
    148             'meliconnect_sync_price_woo_to_meli'         => false,
    149             'meliconnect_sync_status_woo_to_meli'        => false,
    150             'meliconnect_sync_stock_meli_to_woo'         => false,
    151             'meliconnect_sync_price_meli_to_woo'         => false,
    152             'meliconnect_sync_variations_price_meli_to_woo' => false,
     148
     149
     150            'meliconnect_sync_enable_auto_sync'          => 'true',
     151            'meliconnect_sync_on_orders'                 => 'true',
     152            'meliconnect_sync_on_product_changes'        => 'true',
     153
     154
    153155        );
    154156
  • meliconnect/trunk/includes/Core/Views/Partials/Form/checkbox.php

    r3367389 r3470490  
    3232        <div class="meliconnect-column meliconnect-is-1"></div>
    3333        <div class="meliconnect-column meliconnect-is-11 pl-5">
    34             <p class="help" style="min-height: 120px"><?php echo esc_html( $helpText ); ?></p>
     34            <p class="help" style="min-height: 20px"><?php echo esc_html( $helpText ); ?></p>
    3535        </div>
    3636    </div>
  • meliconnect/trunk/includes/Core/Views/Partials/Settings/general.php

    r3372090 r3470490  
    136136                                    <div class="meliconnect-select meliconnect-is-fullwidth">
    137137                                        <select name="meliconnect_general_sync_method" id="meliconnect_general_sync_method">
    138                                             <option value="wordpress" <?php selected( $general_data['meliconnect_general_sync_method'], 'WordPress' ); ?>><?php esc_html_e( 'WordPress', 'meliconnect' ); ?></option>
    139                                             <option value="custom" <?php selected( $general_data['meliconnect_general_sync_method'], 'custom' ); ?>><?php esc_html_e( 'Custom', 'meliconnect' ); ?></option>
     138                                            <option value="wordpress" selected><?php esc_html_e( 'WordPress Cron', 'meliconnect' ); ?></option>
    140139                                        </select>
    141140                                    </div>
     
    144143                        </div>
    145144                    </div>
     145                   
     146                   
    146147                </div>
    147148            </div>
    148             <div class="meliconnect-columns meliconnect-mt-4">
    149                 <div class="meliconnect-column meliconnect-is-9">
    150                     <div class="meliconnect-content">
    151                         <?php
    152                         // Detectar HTTPS correctamente
    153                         $https  = isset( $_SERVER['HTTPS'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTPS'] ) ) : '';
    154                         $scheme = ( ! empty( $https ) && strtolower( $https ) !== 'off' ) ? 'https' : 'http';
    155 
    156                         // Obtener el nombre del host (sanitizado)
    157                         $host = isset( $_SERVER['HTTP_HOST'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '';
    158 
    159                         // Construir la URL base
    160                         $sync_url = $scheme . '://' . $host;
    161                         ?>
    162                         <strong><?php esc_html_e( 'External automatic synchronization URL (custom):', 'meliconnect' ); ?></strong>
    163                         <code><?php echo esc_url( $sync_url ); ?>/wp-json/meliconnect/v1/cronexternal/export-import</code>
    164                     </div>
    165                 </div>
    166                 <div class="meliconnect-column meliconnect-is-3">
    167                     <div class="meliconnect-field meliconnect-is-grouped meliconnect-is-grouped-right">
    168                     </div>
    169                 </div>
    170             </div>
     149            <p class="">
     150                <?php esc_html_e(
     151                    'WordPress Cron runs only when the website receives visits. For frequent or critical synchronizations, consider disabling WordPress Cron and running it from the server using a system cron job.',
     152                    'meliconnect'
     153                ); ?>
     154            </p>
    171155        </div>
    172156    </section>
  • meliconnect/trunk/includes/Core/Views/Partials/Settings/sync.php

    r3372090 r3470490  
    66<form id="meliconnect-sync-settings-form">
    77
    8     <input type="hidden" name="checkbox_fields" id="checkbox_fields" value="meliconnect_sync_stock_woo_to_meli,meliconnect_sync_price_woo_to_meli,meliconnect_sync_status_woo_to_meli,meliconnect_sync_stock_meli_to_woo,meliconnect_sync_price_meli_to_woo,meliconnect_sync_variations_price_meli_to_woo">
     8    <input type="hidden" name="checkbox_fields" id="checkbox_fields"
     9        value="meliconnect_sync_enable_auto_sync,meliconnect_sync_on_orders,meliconnect_sync_on_product_changes">
    910
    10     <section class="meliconnect-section">
    11         <div class="meliconnect-container">
    12             <div class="meliconnect-columns">
    13                 <div class="meliconnect-column">
    14                     <?php if ( !empty($sellers_with_free_plan) ) : ?>
     11    <section class="meliconnect-section">
     12        <div class="meliconnect-container">
     13            <div class="meliconnect-columns">
     14                <div class="meliconnect-column">
     15
     16                    <?php if ( ! empty( $sellers_with_free_plan ) ) : ?>
    1517                        <div class="meliconnect-notification meliconnect-is-warning">
    1618                            <?php
     
    2224                        </div>
    2325                    <?php endif; ?>
    24                     <h2 class="meliconnect-title meliconnect-is-5"><?php esc_html_e( 'Automatic Synchronization', 'meliconnect' ); ?></h2>
    2526
    26                     <div class="meliconnect-content">
    27                         <div class="meliconnect-columns meliconnect-is-mobile meliconnect-is-multiline">
    28                             <div class="meliconnect-column meliconnect-is-4">
    29                                 <div class="meliconnect-field">
    30                                     <label class="meliconnect-label" for="meliconnect_sync_cron_status"><?php esc_html_e( 'Apply on', 'meliconnect' ); ?></label>
    31                                     <div class="meliconnect-control">
    32                                         <div class="meliconnect-select meliconnect-is-fullwidth">
    33                                             <select name="meliconnect_sync_cron_status" id="meliconnect_sync_cron_status">
    34                                                 <option value="deactive" <?php selected( $sync_data['meliconnect_sync_cron_status'], 'deactive' ); ?>><?php esc_html_e( 'Deactivate', 'meliconnect' ); ?></option>
    35                                                 <option value="active" <?php selected( $sync_data['meliconnect_sync_cron_status'], 'active' ); ?>><?php esc_html_e( 'Active', 'meliconnect' ); ?></option>
    36                                             </select>
    37                                         </div>
    38                                     </div>
    39                                 </div>
    40                             </div>
    41                             <div class="meliconnect-column meliconnect-is-8">
    42                                 <div class="meliconnect-columns meliconnect-meliconnect-is-mobile">
    43                                     <div class="meliconnect-column meliconnect-is-5">
    44                                         <div class="meliconnect-field">
    45                                             <label class="meliconnect-label" for="meliconnect_sync_cron_items_batch"><?php esc_html_e( 'Items per batch', 'meliconnect' ); ?></label>
    46                                             <div class="meliconnect-control">
    47                                                 <input class="meliconnect-input" type="number" min="1" name="meliconnect_sync_cron_items_batch" id="meliconnect_sync_cron_items_batch" value="<?php echo isset( $sync_data['meliconnect_sync_cron_items_batch'] ) ? esc_attr( $sync_data['meliconnect_sync_cron_items_batch'] ) : ''; ?>" min="1" max="1000">
    48                                             </div>
    49                                         </div>
    50                                     </div>
    51                                     <div class="meliconnect-column meliconnect-is-4">
    52                                         <div class="meliconnect-field">
    53                                             <label class="meliconnect-label" for="meliconnect_sync_cron_frecuency_minutes"><?php esc_html_e( 'Frequency (minutes)', 'meliconnect' ); ?></label>
    54                                             <div class="meliconnect-control">
    55                                                 <input class="meliconnect-input" type="number" min="1" name="meliconnect_sync_cron_frecuency_minutes" id="meliconnect_sync_cron_frecuency_minutes" value="<?php echo isset( $sync_data['meliconnect_sync_cron_frecuency_minutes'] ) ? esc_attr( $sync_data['meliconnect_sync_cron_frecuency_minutes'] ) : ''; ?>">
    56                                             </div>
    57                                         </div>
    58                                     </div>
    59                                     <div class="meliconnect-column meliconnect-is-3">
    60                                         <div class="meliconnect-field">
    61                                             <label class="meliconnect-label" for="meliconnect_sync_cron_method"><?php esc_html_e( 'Method', 'meliconnect' ); ?></label>
    62                                             <div class="meliconnect-control">
    63                                                 <div class="meliconnect-select meliconnect-is-fullwidth">
    64                                                     <select name="meliconnect_sync_cron_method" id="meliconnect_sync_cron_method">
    65                                                         <option value="wordpress" <?php selected( $sync_data['meliconnect_sync_cron_method'], 'WordPress' ); ?>><?php esc_html_e( 'WordPress', 'meliconnect' ); ?></option>
    66                                                         <option value="custom" <?php selected( $sync_data['meliconnect_sync_cron_method'], 'custom' ); ?>><?php esc_html_e( 'Custom', 'meliconnect' ); ?></option>
    67                                                     </select>
    68                                                 </div>
    69                                             </div>
    70                                         </div>
    71                                     </div>
    72                                 </div>
    73                             </div>
    74                         </div>
    75                         <div class="meliconnect-columns meliconnect-mt-4">
    76                             <div class="meliconnect-column meliconnect-is-9">
    77                                 <div class="meliconnect-content">
    78                                     <?php
    79                                     // Detectar si HTTPS está activo
    80                                     $https  = isset( $_SERVER['HTTPS'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTPS'] ) ) : '';
    81                                     $scheme = ( ! empty( $https ) && strtolower( $https ) !== 'off' ) ? 'https' : 'http';
     27                    <h2 class="meliconnect-title meliconnect-is-5">
     28                        <?php esc_html_e( 'Automatic Synchronization', 'meliconnect' ); ?>
     29                    </h2>
    8230
    83                                     // Obtener el nombre del host de forma segura
    84                                     $host_raw = isset( $_SERVER['HTTP_HOST'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_HOST'] ) ) : '';
    85                                     $host     = wp_parse_url( '//' . $host_raw, PHP_URL_HOST ); // asegura un host válido
     31                    <div class="meliconnect-content">
    8632
    87                                     // Construir la URL base
    88                                     $sync_url = $scheme . '://' . $host;
    89                                     ?>
    90                                     <strong><?php esc_html_e( 'External automatic synchronization URL (custom):', 'meliconnect' ); ?></strong>
    91                                     <code><?php echo esc_url( $sync_url ); ?>/wp-json/meliconnect/v1/cronexternal/sync</code>
    92                                 </div>
     33                        <?php
     34                        self::print_setting_checkbox(
     35                            'meliconnect_sync_enable_auto_sync',
     36                            esc_html__( 'Enable automatic synchronization', 'meliconnect' ),
     37                            $sync_data['meliconnect_sync_enable_auto_sync'],
     38                            'true',
     39                            esc_html__(
     40                                'Automatically update WooCommerce products when MercadoLibre sends callbacks, such as product creation, updates, deletions, or order events.',
     41                                'meliconnect'
     42                            )
     43                        );
     44                        ?>
    9345
    94                             </div>
    95                             <div class="meliconnect-column meliconnect-is-3">
    96                                 <div class="meliconnect-field  meliconnect-is-grouped meliconnect-is-grouped-right">
    97                                 </div>
    98                             </div>
    99                         </div>
    100                         <hr>
    101                         <div class="meliconnect-columns">
    102                             <div id="sync-setting-left-meliconnect-column" class="meliconnect-column">
    103                                 <div class="meliconnect-columns">
    104                                     <div class="meliconnect-column">
    105                                         <h3 class="meliconnect-title meliconnect-is-6"><?php esc_html_e( 'From Woo to Meli', 'meliconnect' ); ?></h3>
    106                                     </div>
    107                                 </div>
    108                                 <div class="meliconnect-columns">
    109                                     <div class="meliconnect-column">
    110                                         <?php
     46                        <hr>
    11147
    112                                         self::print_setting_checkbox(
    113                                             'meliconnect_sync_stock_woo_to_meli',
    114                                             esc_html__( 'Stock Synchronization', 'meliconnect' ),
    115                                             $sync_data['meliconnect_sync_stock_woo_to_meli'],
    116                                             'true',
    117                                             esc_html__( 'When changing the STOCK in WooCommerce, WooCommerce hooks are used to capture the new stock and update it in MercadoLibre. <br>(Do not enable this feature if you have different stocks in both channels.)', 'meliconnect' )
    118                                         );
     48                        <h3 class="meliconnect-title meliconnect-is-6">
     49                            <?php esc_html_e( 'Process callbacks for:', 'meliconnect' ); ?>
     50                        </h3>
    11951
    120                                         self::print_setting_checkbox(
    121                                             'meliconnect_sync_price_woo_to_meli',
    122                                             esc_html__( 'Price Synchronization', 'meliconnect' ),
    123                                             $sync_data['meliconnect_sync_price_woo_to_meli'],
    124                                             'true',
    125                                             esc_html__( 'When changing the PRICE in WooCommerce, WooCommerce hooks are used to capture the new price and update it in MercadoLibre. <br>(Do not enable this feature if you have different prices in both channels.)', 'meliconnect' )
    126                                         );
     52                        <?php
     53                        self::print_setting_checkbox(
     54                            'meliconnect_sync_on_orders',
     55                            esc_html__( 'Order events', 'meliconnect' ),
     56                            $sync_data['meliconnect_sync_on_orders'],
     57                            'true',
     58                            esc_html__( 'Update WooCommerce stock when an order is created or updated in MercadoLibre.', 'meliconnect' )
     59                        );
    12760
    128                                         self::print_setting_checkbox(
    129                                             'meliconnect_sync_status_woo_to_meli',
    130                                             esc_html__( 'Status Synchronization', 'meliconnect' ),
    131                                             $sync_data['meliconnect_sync_status_woo_to_meli'],
    132                                             'true',
    133                                             esc_html__( 'When changing the STATUS in WooCommerce, update it in MercadoLibre. <br>(Do not enable this feature if you manage different product statuses in both channels.)', 'meliconnect' )
    134                                         );
    135                                         ?>
    136                                     </div>
    137                                 </div>
     61                        self::print_setting_checkbox(
     62                            'meliconnect_sync_on_product_changes',
     63                            esc_html__( 'Product changes', 'meliconnect' ),
     64                            $sync_data['meliconnect_sync_on_product_changes'],
     65                            'true',
     66                            esc_html__( 'Update WooCommerce products when listings are modified in MercadoLibre.', 'meliconnect' )
     67                        );
     68                        ?>
    13869
     70                        <div class="meliconnect-notification meliconnect-is-info">
     71                            <?php esc_html_e(
     72                                'Callbacks are always received and stored. These options only control when WooCommerce is updated.',
     73                                'meliconnect'
     74                            ); ?>
     75                        </div>
    13976
    140                             </div>
    141                             <div id="sync-setting-right-meliconnect-column" class="meliconnect-column">
    142                                 <div class="meliconnect-columns">
    143                                     <div class="meliconnect-column">
    144                                         <h3 class="meliconnect-title meliconnect-is-6"><?php esc_html_e( 'From Meli to Woo', 'meliconnect' ); ?></h3>
    145                                     </div>
    146                                 </div>
     77                        <div class="meliconnect-level">
     78                            <div class="meliconnect-level-right">
     79                                <button type="submit"
     80                                    class="meliconnect-button meliconnect-is-primary">
     81                                    <?php esc_html_e( 'Save Sync Settings', 'meliconnect' ); ?>
     82                                </button>
     83                            </div>
     84                        </div>
    14785
    148                                 <div class="meliconnect-columns">
    149                                     <div class="meliconnect-column">
    150                                         <?php
    151 
    152                                         self::print_setting_checkbox(
    153                                             'meliconnect_sync_stock_meli_to_woo',
    154                                             esc_html__( 'Stock Synchronization', 'meliconnect' ),
    155                                             $sync_data['meliconnect_sync_stock_meli_to_woo'],
    156                                             'true',
    157                                             esc_html__( 'When changing the STOCK in MercadoLibre, update the same in WooCommerce. <br>(Do not enable this feature if you have different stocks in both channels.)', 'meliconnect' )
    158                                         );
    159 
    160                                         self::print_setting_checkbox(
    161                                             'meliconnect_sync_price_meli_to_woo',
    162                                             esc_html__( 'Price Synchronization', 'meliconnect' ),
    163                                             $sync_data['meliconnect_sync_price_meli_to_woo'],
    164                                             'true',
    165                                             esc_html__( 'When changing the PRICE in MercadoLibre, update the same in WooCommerce. <br>(Do not enable this feature if you have different prices in both channels.)', 'meliconnect' )
    166                                         );
    167 
    168                                         self::print_setting_checkbox(
    169                                             'meliconnect_sync_variations_price_meli_to_woo',
    170                                             esc_html__( 'Variation Price Synchronization', 'meliconnect' ),
    171                                             $sync_data['meliconnect_sync_variations_price_meli_to_woo'],
    172                                             'true',
    173                                             esc_html__( 'When changing the PRICE in MercadoLibre, update it across all product variations in WooCommerce. <br>(Do not enable this feature if you have different prices in both channels.)', 'meliconnect' )
    174                                         );
    175 
    176 
    177                                         ?>
    178                                     </div>
    179                                 </div>
    180                             </div>
    181                         </div>
    182                         <div class="meliconnect-columns">
    183                             <div class="meliconnect-column">
    184                                 <div class="meliconnect-level">
    185                                     <div class="meliconnect-level-left">
    186                                     </div>
    187                                     <div class="meliconnect-level-right">
    188 
    189                                         <div class="meliconnect-field meliconnect-is-grouped">
    190                                             <p class="meliconnect-control">
    191                                                 <button id="save-sync-button" type="submit" class="meliconnect-button  meliconnect-is-primary"><?php esc_html_e( 'Save Sync Settings', 'meliconnect' ); ?></button>
    192                                             </p>
    193                                         </div>
    194                                     </div>
    195                                 </div>
    196                             </div>
    197                         </div>
    198                     </div>
    199                 </div>
    200             </div>
    201 
    202         </div>
    203     </section>
     86                    </div>
     87                </div>
     88            </div>
     89        </div>
     90    </section>
    20491</form>
  • meliconnect/trunk/meliconnect.php

    r3457358 r3470490  
    44Plugin URI: https://mercadolibre.meliconnect.com/
    55Description: WooCommerce & Mercado Libre integration to import, export, and synchronize products between your WooCommerce store and Mercado Libre accounts.
    6 Version: 1.6.1
     6Version: 1.6.2
    77Author: meliconnect
    88Text Domain: meliconnect
     
    2626 * Define constantes del plugin
    2727 */
    28 define( 'MELICONNECT_VERSION', '1.6.1' );
     28define( 'MELICONNECT_VERSION', '1.6.2' );
    2929define( 'MELICONNECT_DATABASE_VERSION', '1.1.1' );
    3030define( 'MELICONNECT_TEXTDOMAIN', 'meliconnect' );
  • meliconnect/trunk/readme.txt

    r3457358 r3470490  
    66Requires PHP:    8.0
    77Tested up to: 6.9
    8 Stable tag: 1.6.1
     8Stable tag: 1.6.2
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.