Plugin Directory

Changeset 3041796


Ignore:
Timestamp:
02/27/2024 09:22:21 AM (2 years ago)
Author:
litexten
Message:

fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • litcommerce/trunk/litcommerce.php

    r3023376 r3041796  
    33Plugin Name: LitCommerce
    44Description: Helps you easily integrate your WooCommerce store with LitCommerce.
    5 Version: 1.1.2
     5Version: 1.1.3
    66Author: LitCommerce
    77Author URI: https://litcommerce.com
     
    336336        }
    337337    }
    338 
     338    foreach ($response->data['meta_data'] as $meta_data){
     339        if($meta_data->key == '_yoast_wpseo_primary_yith_product_brand'){
     340            $brand_id = $meta_data->value;
     341            $terms_data = get_term_by( 'id', $brand_id, 'yith_product_brand' );
     342            try {
     343                if($terms_data){
     344                    $response->data['litc_product_brand'] = $terms_data->name;
     345                    break;
     346                }
     347            }catch (Exception $e){
     348
     349            }
     350
     351
     352        }
     353    }
    339354    return $response;
    340355}
Note: See TracChangeset for help on using the changeset viewer.