Plugin Directory

Changeset 3153566


Ignore:
Timestamp:
09/17/2024 07:53:14 PM (19 months ago)
Author:
productfeeder
Message:

Updated to version 2.5.1

Location:
product-feeder
Files:
11 added
3 edited

Legend:

Unmodified
Added
Removed
  • product-feeder/trunk/includes/product-feeder.php

    r3107457 r3153566  
    648648                        }
    649649                        foreach (array_keys($Options) as $Key) {
    650                             if (is_array($Options[$Key])) continue;
    651                             $Terms = wc_get_object_terms($ProductID, $Options[$Key], 'name');
    652                             if (!empty($Terms)) {
    653                                 $Value = implode(' ', $Terms);
    654                                 if (in_array($Key, $Options['Brand']) && empty($ProductData['Brand'])) $ProductData['Brand'] = $Value;
    655                                 if (in_array($Key, $Options['Color']) && empty($ProductColor)) $ProductColor = $Value;
    656                                 if (in_array($Key, $Options['Season']) && empty($ProductData['Season'])) $ProductData['Season'] = $Value;
    657                                 if (in_array($Key, $Options['Gender']) && empty($ProductGender)) $ProductGender = $Value;
    658                                 if (in_array($Key, $Options['Material']) && empty($ProductMaterial)) $ProductMaterial = $Value;
    659                                 if (in_array($Key, $Options['Condition']) && empty($ProductCondition)) $ProductCondition = $Value;
    660                                 if (in_array($Key, $Options['DeliveryTerms']) && empty($ProductDeliveryTerms)) $ProductDeliveryTerms = $Value;
     650                            $OptionValues = $Options[$Key];
     651                            if (!is_array($OptionValues)) $OptionValues = array($OptionValues);
     652                            foreach ($OptionValues as $OptionValue) {
     653                                $Terms = wc_get_object_terms($ProductID, $OptionValue, 'name');
     654                                if (!empty($Terms)) {
     655                                    $Value = implode(' ', $Terms);
     656                                    if (in_array($Key, $Options['Brand']) && empty($ProductData['Brand'])) $ProductData['Brand'] = $Value;
     657                                    if (in_array($Key, $Options['Color']) && empty($ProductColor)) $ProductColor = $Value;
     658                                    if (in_array($Key, $Options['Season']) && empty($ProductData['Season'])) $ProductData['Season'] = $Value;
     659                                    if (in_array($Key, $Options['Gender']) && empty($ProductGender)) $ProductGender = $Value;
     660                                    if (in_array($Key, $Options['Material']) && empty($ProductMaterial)) $ProductMaterial = $Value;
     661                                    if (in_array($Key, $Options['Condition']) && empty($ProductCondition)) $ProductCondition = $Value;
     662                                    if (in_array($Key, $Options['DeliveryTerms']) && empty($ProductDeliveryTerms)) $ProductDeliveryTerms = $Value;
     663                                }
    661664                            }
    662665                        }
     
    744747                                    }
    745748                                    foreach (array_keys($Options) as $Key) {
    746                                         if (is_array($Options[$Key])) continue;
    747                                         $Terms = wc_get_object_terms($VariationID, $Options[$Key], 'name');
    748                                         if (!empty($Terms)) {
    749                                             $Value = implode(' ', $Terms);
    750                                             if (in_array($Key, $Options['Brand']) && empty($ProductData['Brand'])) $ProductData['Brand'] = $Value;
    751                                             if (in_array($Key, $Options['EAN']) && empty($VariationData['EAN'])) $VariationData['EAN'] = $Value;
    752                                             if (in_array($Key, $Options['Color']) && empty($VariationData['Color'])) $VariationData['Color'] = $Value;
    753                                             if (in_array($Key, $Options['Season']) && empty($ProductData['Season'])) $ProductData['Season'] = $Value;
    754                                             if (in_array($Key, $Options['Gender']) && empty($VariationData['Gender'])) $VariationData['Gender'] = $Value;
    755                                             if (in_array($Key, $Options['Material']) && empty($VariationData['Material'])) $VariationData['Material'] = $Value;
    756                                             if (in_array($Key, $Options['Condition']) && empty($VariationData['Condition'])) $VariationData['Condition'] = $Value;
    757                                             if (in_array($Key, $Options['DeliveryTerms']) && empty($VariationData['DeliveryTerms'])) $VariationData['DeliveryTerms'] = $Value;
     749                                        $OptionValues = $Options[$Key];
     750                                        if (!is_array($OptionValues)) $OptionValues = array($OptionValues);
     751                                        foreach ($OptionValues as $OptionValue) {
     752                                            $Terms = wc_get_object_terms($VariationID, $OptionValue, 'name');
     753                                            if (!empty($Terms)) {
     754                                                $Value = implode(' ', $Terms);
     755                                                if (in_array($Key, $Options['Brand']) && empty($ProductData['Brand'])) $ProductData['Brand'] = $Value;
     756                                                if (in_array($Key, $Options['EAN']) && empty($VariationData['EAN'])) $VariationData['EAN'] = $Value;
     757                                                if (in_array($Key, $Options['Color']) && empty($VariationData['Color'])) $VariationData['Color'] = $Value;
     758                                                if (in_array($Key, $Options['Season']) && empty($ProductData['Season'])) $ProductData['Season'] = $Value;
     759                                                if (in_array($Key, $Options['Gender']) && empty($VariationData['Gender'])) $VariationData['Gender'] = $Value;
     760                                                if (in_array($Key, $Options['Material']) && empty($VariationData['Material'])) $VariationData['Material'] = $Value;
     761                                                if (in_array($Key, $Options['Condition']) && empty($VariationData['Condition'])) $VariationData['Condition'] = $Value;
     762                                                if (in_array($Key, $Options['DeliveryTerms']) && empty($VariationData['DeliveryTerms'])) $VariationData['DeliveryTerms'] = $Value;
     763                                            }
    758764                                        }
    759765                                    }
  • product-feeder/trunk/product-feeder.php

    r3107443 r3153566  
    44    * Plugin URI:       https://product-feeder.com/nl/sources/wordpress-woocommerce
    55    * Description:      Connect with various marketplaces for automated synchronization of products, orders and returns! Try it now at https://product-feeder.com
    6     * Version:          2.5.0
     6    * Version:          2.5.1
    77    * Author:           Product Feeder
    88    * Author URI:       https://product-feeder.com
  • product-feeder/trunk/readme.txt

    r3107443 r3153566  
    55Requires at least: 6.0
    66Tested up to: 6.4
    7 Stable tag: 2.5.0
     7Stable tag: 2.5.1
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    138138= 2.5.0 =
    139139* Optimized order handling
     140
     141= 2.5.1 =
     142* Updated taxonomy support
Note: See TracChangeset for help on using the changeset viewer.