Default wp table prefix is hardcoded in LegacyProductSetMigration file
-
The LegacyProductSetMigration.php file introduced in 3.5.6:
Update – Deprecate FB Product Sets tab and migrate legacy product sets
Contains a hardcoded “wp_” database table prefix. for wp_terms and wp_term_taxonomy// Query legacy fb product sets
global $wpdb;
$fb_product_set_taxonomy_name = 'fb_product_set';
$results = $wpdb->get_results(
$wpdb->prepare(
'SELECT t.term_id, t.name, t.slug, tt.description
FROM wp_terms t
INNER JOIN wp_term_taxonomy tt ON t.term_id = tt.term_id
WHERE tt.taxonomy = %s',
$fb_product_set_taxonomy_name
)
);This will throw a database error and return zero results for websites using custom prefixes.
To ensure the right prefix is used the {$wpdb->terms} and {$wpdb->term_taxonomy} variables should be used instead.
You must be logged in to reply to this topic.