Plugin Directory

Changeset 3435872


Ignore:
Timestamp:
01/09/2026 11:57:52 AM (7 weeks ago)
Author:
webtoffee
Message:

2.3.5

*[Fix] - Replaced the maybe_unserialize() with our custom function 'wt_decode_data'
*[Fix] - Category mapping dropdown was not rendering options properly.
*[Compatibility] - Tested OK with WooCommerce 10.4.3
*[Compatibility] - Tested OK with WordPress 6.9

Location:
webtoffee-product-feed
Files:
1588 added
18 edited

Legend:

Unmodified
Added
Removed
  • webtoffee-product-feed/trunk/README.txt

    r3425364 r3435872  
    55Requires at least: 4.0
    66Tested up to: 6.9
    7 Stable tag: 2.3.4
     7Stable tag: 2.3.5
    88Requires PHP: 5.6
    99License: GPLv3 or later
     
    317317== Changelog ==
    318318
     319= 2.3.5 2026-01-09 =
     320*[Fix] - Replaced the maybe_unserialize() with our custom function 'wt_decode_data'
     321*[Fix] - Category mapping dropdown was not rendering options properly.
     322*[Compatibility] - Tested OK with WooCommerce 10.4.3
     323*[Compatibility] - Tested OK with WordPress 6.9
     324
    319325= 2.3.4  2025-12-22 =
    320 *[Fix] - Security Fixes
     326*[Fix] - Vulnerability. Thanks to Mrreee (Patchstack) for pointing out the issue.
    321327*[Compatibility] - Tested OK with WooCommerce 10.4.2
    322328*[Compatibility] - Tested OK with WordPress 6.9
     
    601607== Upgrade Notice ==
    602608
    603 = 2.3.4 =
    604 *[Fix] - Security Fixes
    605 *[Compatibility] - Tested OK with WooCommerce 10.4.2
     609= 2.3.5 =
     610*[Fix] - Replaced the maybe_unserialize() with our custom function 'wt_decode_data'
     611*[Fix] - Category mapping dropdown was not rendering options properly.
     612*[Compatibility] - Tested OK with WooCommerce 10.4.3
    606613*[Compatibility] - Tested OK with WordPress 6.9
  • webtoffee-product-feed/trunk/admin/class-webtoffee-product-feed-sync-admin.php

    r3395776 r3435872  
    11781178                                // All other batch update last log row
    11791179                                $last_log = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM %s ORDER BY id DESC LIMIT 1', $table_name ) ); //phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
    1180                                 $batch_pocess_log = maybe_unserialize($last_log->data);
     1180                                $batch_pocess_log = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($last_log->data);
    11811181
    11821182                                $batch_pocess_log[ $wt_batch_hash_key ][] = [
     
    12921292                                           
    12931293                           <?php
    1294                              $log_list_single_batch = maybe_unserialize($log_list_handles->data);
     1294                             $log_list_single_batch = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($log_list_handles->data);
    12951295                                foreach ( $log_list_single_batch as $h_key => $log_list_details ) :
    12961296                                foreach ( $log_list_details as $key => $single_batch_log ) :
  • webtoffee-product-feed/trunk/admin/classes/class-logreader.php

    r3395073 r3435872  
    118118        for($i = $start_line; $i < count($lines); $i++) {
    119119            $data = $lines[$i];
    120             $data = maybe_unserialize($data);
     120            $data = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($data);
    121121            if(is_array($data))
    122122            {
  • webtoffee-product-feed/trunk/admin/modules/bing/bing.php

    r3395073 r3435872  
    8383
    8484        <tr class="form-field">
    85             <th scope="row" valign="top"><label for="wt_google_category">Google Category</label></th>
     85            <th scope="row" valign="top"><label for="wt_google_category"><?php esc_html_e('Google Category', 'webtoffee-product-feed'); ?></label></th>
    8686            <td>
    8787                            <select name="wt_google_category" class="wc-enhanced-select">
    88         <?php echo wp_kses_post( wt_google_category_dropdown( $fb_category_id ) ); ?>
     88        <?php
     89        $allowed_html = array(
     90            'option' => array(
     91                'value'    => true,
     92                'selected' => true,
     93            ),
     94        );
     95        echo wp_kses( wt_google_category_dropdown( $fb_category_id ), $allowed_html );
     96        ?>
    8997                </select>
    9098
  • webtoffee-product-feed/trunk/admin/modules/cron/cron.php

    r3425364 r3435872  
    162162                $history_row = Webtoffee_Product_Feed_Sync_History::get_history_entry_by_id($cron_id);
    163163               
    164                 $form_data = maybe_unserialize( $history_row['data'] );
     164                $form_data = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data( $history_row['data'] );
    165165               
    166166                $file_name = $form_data['post_type_form_data']['item_filename'].'-copy.'.$form_data['advanced_form_data']['wt_pf_file_as'];
     
    301301                        {
    302302                            /* deleting history entries */
    303                             $history_arr=($cron_data['history_id_list']!="" ? maybe_unserialize($cron_data['history_id_list']) : array());
     303                            $history_arr=($cron_data['history_id_list']!="" ? Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_data['history_id_list']) : array());
    304304                            $history_arr=(is_array($history_arr) ? $history_arr : array());
    305305                            if(count($history_arr)>0)
     
    522522                            if (!is_null($cron_module_obj)) {
    523523                                $cron_data = $cron_module_obj->get_cron_by_id($requested_cron_edit_id);
    524                                 $cron_data=maybe_unserialize($cron_data['cron_data']);
     524                                $cron_data=Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_data['cron_data']);
    525525                                include plugin_dir_path(__FILE__).'views/_schedule_update.php';
    526526                            }
     
    782782                }else
    783783                {
    784                     $form_data=maybe_unserialize($cron_listv['data']);
     784                    $form_data=Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_listv['data']);
    785785                }
    786786
    787                 $cron_data=maybe_unserialize($cron_listv['cron_data']);
     787                $cron_data=Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_listv['cron_data']);
    788788                $file_name=(isset($cron_data['file_name']) ?  $cron_data['file_name'] : '');
    789789                if($cron_listv['status']==self::$status_arr['finished'] || $cron_listv['status']==self::$status_arr['not_started'])
     
    867867                    if($cron_listv['history_id']==0)
    868868                    {
    869                         $history_id_list=($cron_listv['history_id_list']!="" ? maybe_unserialize($cron_listv['history_id_list']) : array());
     869                        $history_id_list=($cron_listv['history_id_list']!="" ? Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_listv['history_id_list']) : array());
    870870                        $history_id_list=(!is_array($history_id_list) ? array() : $history_id_list);
    871871                        $history_id_list[]=$out['history_id']; //history id from import/export module
     
    906906
    907907        //add next start time based on interval type
    908         $cron_data=maybe_unserialize($cron_listv['cron_data']);
     908        $cron_data=Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_listv['cron_data']);
    909909        $prev_start_time=$cron_listv['start_time'];
    910910        $update_data['start_time']=self::prepare_start_time($cron_data, $prev_start_time);
     
    12801280        if ( $cron_details ) {
    12811281
    1282             $cron_form_data      = maybe_unserialize( $cron_details[ 'data' ] ); //cron settings data Eg: Cron interval type
     1282            $cron_form_data      = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data( $cron_details[ 'data' ] ); //cron settings data Eg: Cron interval type
    12831283            $advanced_form_data= $cron_form_data[ 'advanced_form_data' ];
    12841284            $action_type = $cron_details['action_type'];
     
    12901290                'item_type'      => $cron_details['item_type'],
    12911291                'schedule_type'  => $cron_details[ 'schedule_type' ],
    1292                 'cron_data'  => maybe_unserialize( $cron_details[ 'cron_data' ] ),
     1292                'cron_data'  => Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data( $cron_details[ 'cron_data' ] ),
    12931293                "method_{$action_type}_form_data"        => $method_action_type_form_data,
    12941294                'advanced_form_data'         =>  $advanced_form_data ,
     
    13591359            return $out;
    13601360        }
    1361         $cron_form_details = maybe_unserialize($cron_details['data']);
     1361        $cron_form_details = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_details['data']);
    13621362
    13631363        /* process form data */
  • webtoffee-product-feed/trunk/admin/modules/cron/views/_schedule_list.php

    r3395073 r3435872  
    2626    foreach($cron_list as $key =>$cron_item)
    2727    {
    28                 $feed_data = maybe_unserialize($cron_item['data']);
     28                $feed_data = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_item['data']);
    2929                $filename = isset( $feed_data['post_type_form_data']['wt_pf_export_catalog_name'] ) ? $feed_data['post_type_form_data']['wt_pf_export_catalog_name'] : '' ;
    3030                if( ''=== $filename ){
  • webtoffee-product-feed/trunk/admin/modules/export/export.php

    r3395073 r3435872  
    469469                if($history_data && $history_data['template_type']==$this->module_base)
    470470                {
    471                     $form_data=maybe_unserialize($history_data['data']);
     471                    $form_data=Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($history_data['data']);
    472472
    473473                    if($form_data && is_array($form_data))
     
    586586        }
    587587
    588         $form_data=maybe_unserialize($export_data['data']);
     588        $form_data=Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($export_data['data']);
    589589
    590590        //taking file name
     
    697697
    698698            //processing form data
    699             $form_data=(isset($export_data['data']) ? maybe_unserialize($export_data['data']) : array());
     699            $form_data=(isset($export_data['data']) ? Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($export_data['data']) : array());
    700700        }
    701701        $this->to_export=$to_process;
     
    714714            // This is important because sanitize_text_field() strips control characters like tabs
    715715            $csv_delimiter = ',';
    716             $delimiter_preset = isset($form_data['advanced_form_data']['delimiter_preset']) ? trim($form_data['advanced_form_data']['delimiter_preset']) : '';
     716            $delimiter_preset = isset($form_data['advanced_form_data']['wt_pf_delimiter_preset']) ? trim($form_data['advanced_form_data']['wt_pf_delimiter_preset']) : '';
    717717            $custom_delimiter = isset($form_data['advanced_form_data']['wt_pf_delimiter']) ? trim($form_data['advanced_form_data']['wt_pf_delimiter']) : '';
    718718           
  • webtoffee-product-feed/trunk/admin/modules/fruugo/fruugo.php

    r3395073 r3435872  
    104104            <td>
    105105                            <select name="wt_fruugo_category" class="wc-enhanced-select">
    106         <?php echo wp_kses_post( wt_fruugo_category_dropdown( $fruugo_category_id ) ); ?>
     106        <?php
     107        $allowed_html = array(
     108            'option' => array(
     109                'value'    => true,
     110                'selected' => true,
     111            ),
     112        );
     113        echo wp_kses( wt_fruugo_category_dropdown( $fruugo_category_id ), $allowed_html );
     114        ?>
    107115                </select>
    108116
  • webtoffee-product-feed/trunk/admin/modules/google/google.php

    r3395073 r3435872  
    8989
    9090            <tr class="form-field">
    91                 <th scope="row" valign="top"><label for="wt_google_category">Google Category</label></th>
     91                <th scope="row" valign="top"><label for="wt_google_category"><?php esc_html_e('Google Category', 'webtoffee-product-feed'); ?></label></th>
    9292                <td>
    9393                                    <select name="wt_google_category" style="width:100%" class="wc-enhanced-select">
    94             <?php echo wp_kses_post( wt_google_category_dropdown($fb_category_id) ); ?>
     94            <?php
     95            $allowed_html = array(
     96                'option' => array(
     97                    'value'    => true,
     98                    'selected' => true,
     99                ),
     100            );
     101            echo wp_kses( wt_google_category_dropdown($fb_category_id), $allowed_html );
     102            ?>
    95103                    </select>
    96104
  • webtoffee-product-feed/trunk/admin/modules/heureka/heureka.php

    r3395073 r3435872  
    7979
    8080            <tr class="form-field">
    81                 <th scope="row" valign="top"><label for="wt_google_category">Google Category</label></th>
     81                <th scope="row" valign="top"><label for="wt_google_category"><?php esc_html_e('Google Category', 'webtoffee-product-feed'); ?></label></th>
    8282                <td>
    8383                                <select name="wt_google_category" class="wc-enhanced-select">
    84             <?php echo wp_kses_post( wt_google_category_dropdown( $fb_category_id ) ); ?>
     84            <?php
     85            $allowed_html = array(
     86                'option' => array(
     87                    'value'    => true,
     88                    'selected' => true,
     89                ),
     90            );
     91            echo wp_kses( wt_google_category_dropdown( $fb_category_id ), $allowed_html );
     92            ?>
    8593                    </select>
    8694
  • webtoffee-product-feed/trunk/admin/modules/history/history.php

    r3395073 r3435872  
    214214                if($cron_data)
    215215                {
    216                     $history_id_arr=($cron_data['history_id_list']!="" ? maybe_unserialize($cron_data['history_id_list']) : array());
     216                    $history_id_arr=($cron_data['history_id_list']!="" ? Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($cron_data['history_id_list']) : array());
    217217                    $history_id_arr=(is_array($history_id_arr) ? $history_id_arr : array());
    218218                    $list_by_cron=true;
  • webtoffee-product-feed/trunk/admin/modules/history/views/_history_list.php

    r3395073 r3435872  
    6161                                    <th style="vertical-align:top;"><input type="checkbox" value="<?php echo absint($history_item['id']); ?>" name="history_id[]" class="wt_pf_history_checkbox_sub">
    6262                                <?php echo absint($i); ?></td>
    63         <?php $form_data = maybe_unserialize($history_item['data']); ?>
     63        <?php $form_data = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data($history_item['data']); ?>
    6464                                    <td><?php echo esc_html(pathinfo($history_item['file_name'], PATHINFO_FILENAME)); ?></td>
    6565                                        <?php
  • webtoffee-product-feed/trunk/admin/modules/onbuy/onbuy.php

    r3395073 r3435872  
    101101                    }
    102102                </style>
    103             <th scope="row" valign="top"><label for="wt_onbuy_category">OnBuy Category</label></th>
     103            <th scope="row" valign="top"><label for="wt_onbuy_category"><?php esc_html_e('OnBuy Category', 'webtoffee-product-feed'); ?></label></th>
    104104            <td>
    105105                            <select name="wt_onbuy_category" class="wc-enhanced-select">
    106         <?php echo wp_kses_post( wt_onbuy_category_dropdown( $fb_category_id ) ); ?>
     106        <?php
     107        $allowed_html = array(
     108            'option' => array(
     109                'value'    => true,
     110                'selected' => true,
     111            ),
     112        );
     113        echo wp_kses( wt_onbuy_category_dropdown( $fb_category_id ), $allowed_html );
     114        ?>
    107115                </select>
    108116
  • webtoffee-product-feed/trunk/admin/modules/yandex/yandex.php

    r3395073 r3435872  
    8080
    8181            <tr class="form-field">
    82                 <th scope="row" valign="top"><label for="wt_google_category">Google Category</label></th>
     82                <th scope="row" valign="top"><label for="wt_google_category"><?php esc_html_e('Google Category', 'webtoffee-product-feed'); ?></label></th>
    8383                <td>
    8484                                <select name="wt_google_category" class="wc-enhanced-select">
    85             <?php echo wp_kses_post( wt_google_category_dropdown( $fb_category_id ) ); ?>
     85            <?php
     86            $allowed_html = array(
     87                'option' => array(
     88                    'value'    => true,
     89                    'selected' => true,
     90                ),
     91            );
     92            echo wp_kses( wt_google_category_dropdown( $fb_category_id ), $allowed_html );
     93            ?>
    8694                    </select>
    8795
  • webtoffee-product-feed/trunk/helpers/class-wt-common-helper.php

    r3425364 r3435872  
    469469            if ( ! empty( $custom_attributes ) ) {
    470470                foreach ( $custom_attributes as $value ) {
    471                     $product_attr = maybe_unserialize( $value->type );
     471                    $product_attr = Webtoffee_Product_Feed_Sync_Common_Helper::wt_decode_data( $value->type );
    472472                    if ( is_array( $product_attr ) ) {
    473473                        foreach ( $product_attr as $key => $arr_value ) {
     
    823823       
    824824            return $data;
    825             }
     825        }
    826826       
    827827    }
  • webtoffee-product-feed/trunk/includes/class-webtoffee-product-feed-sync.php

    r3425364 r3435872  
    8383            $this->version = WEBTOFFEE_PRODUCT_FEED_SYNC_VERSION;
    8484        } else {
    85             $this->version = '2.3.4';
     85            $this->version = '2.3.5';
    8686        }
    8787        $this->plugin_name = 'webtoffee-product-feed';
  • webtoffee-product-feed/trunk/includes/fbcatalog/wt-fbfeed-category-helper.php

    r3395073 r3435872  
    2626        <td>
    2727                    <select name="wt_facebook_category" class="wc-enhanced-select">
    28     <?php echo wp_kses_post( wt_fb_category_dropdown( $fb_category_id ) ); ?>
     28    <?php
     29    $allowed_html = array(
     30        'option' => array(
     31            'value'    => true,
     32            'selected' => true,
     33        ),
     34    );
     35    echo wp_kses( wt_fb_category_dropdown( $fb_category_id ), $allowed_html );
     36    ?>
    2937            </select>
    3038
  • webtoffee-product-feed/trunk/webtoffee-product-feed.php

    r3425364 r3435872  
    1414 *
    1515 * @wordpress-plugin
    16  * Plugin Name:       WebToffee WooCommerce Product Feed & Sync Manager
     16 * Plugin Name:       WebToffee WooCommerce Product Feeds - Google Shopping, Pinterest, TikTok Ads, & More
    1717 * Plugin URI:        https://wordpress.org/plugins/webtoffee-product-feed
    1818 * Description:       Integrate your WooCommerce store with popular sale channels including Google Merchant Center, Facebook/Instagram ads&shops, TikTok ads and much more.
    19  * Version:           2.3.4
     19 * Version:           2.3.5
    2020 * Author:            WebToffee
    2121 * Author URI:        https://www.webtoffee.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'WEBTOFFEE_PRODUCT_FEED_SYNC_VERSION', '2.3.4' );
     38define( 'WEBTOFFEE_PRODUCT_FEED_SYNC_VERSION', '2.3.5' );
    3939define( 'WEBTOFFEE_PRODUCT_FEED_ID', 'webtoffee_product_feed' );
    4040define( 'WT_PRODUCT_FEED_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.