Plugin Directory

Changeset 3165621


Ignore:
Timestamp:
10/09/2024 10:23:45 AM (18 months ago)
Author:
productfeeder
Message:

Updated to version 2.6.0

Location:
product-feeder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • product-feeder/tags/2.6.0/includes/product-feeder.php

    r3165618 r3165621  
    138138                    }
    139139                    global $wpdb;
    140                     $query = $wpdb->prepare("SELECT DISTINCT(`".$wpdb->postmeta."`.meta_key) FROM `".$wpdb->posts."` LEFT JOIN `".$wpdb->postmeta."` ON `".$wpdb->posts."`.ID = `".$wpdb->postmeta."`.post_id WHERE `".$wpdb->posts."`.post_type = %s AND `".$wpdb->postmeta."`.meta_key != '' AND `".$wpdb->postmeta."`.meta_key NOT RegExp '(^[_0-9].+$)'", 'product_variation');
     140                    $query = $wpdb->prepare("SELECT DISTINCT(`".$wpdb->postmeta."`.meta_key) FROM `".$wpdb->posts."` LEFT JOIN `".$wpdb->postmeta."` ON `".$wpdb->posts."`.ID = `".$wpdb->postmeta."`.post_id WHERE `".$wpdb->posts."`.post_type = %s AND `".$wpdb->postmeta."`.meta_key != ''", 'product_variation');
    141141                    foreach ($wpdb->get_col($query) as $metafield) {
    142142                        if (in_array($metafield, ['_total_sales', '_tax_class', '_backorders', '_sold_individually', '_virtual', '_downloadable', '_download_limit', '_download_expiry', '_stock_status', '_wc_average_rating', '_wc_review_count', '_product_version', '_regular_price', '_thumbnail_id', '_crosssell_ids', '_weight', '_length', '_height'])) continue;
  • product-feeder/trunk/includes/product-feeder.php

    r3165618 r3165621  
    138138                    }
    139139                    global $wpdb;
    140                     $query = $wpdb->prepare("SELECT DISTINCT(`".$wpdb->postmeta."`.meta_key) FROM `".$wpdb->posts."` LEFT JOIN `".$wpdb->postmeta."` ON `".$wpdb->posts."`.ID = `".$wpdb->postmeta."`.post_id WHERE `".$wpdb->posts."`.post_type = %s AND `".$wpdb->postmeta."`.meta_key != '' AND `".$wpdb->postmeta."`.meta_key NOT RegExp '(^[_0-9].+$)'", 'product_variation');
     140                    $query = $wpdb->prepare("SELECT DISTINCT(`".$wpdb->postmeta."`.meta_key) FROM `".$wpdb->posts."` LEFT JOIN `".$wpdb->postmeta."` ON `".$wpdb->posts."`.ID = `".$wpdb->postmeta."`.post_id WHERE `".$wpdb->posts."`.post_type = %s AND `".$wpdb->postmeta."`.meta_key != ''", 'product_variation');
    141141                    foreach ($wpdb->get_col($query) as $metafield) {
    142142                        if (in_array($metafield, ['_total_sales', '_tax_class', '_backorders', '_sold_individually', '_virtual', '_downloadable', '_download_limit', '_download_expiry', '_stock_status', '_wc_average_rating', '_wc_review_count', '_product_version', '_regular_price', '_thumbnail_id', '_crosssell_ids', '_weight', '_length', '_height'])) continue;
Note: See TracChangeset for help on using the changeset viewer.