Merge pull request #5282 from tivnet/patch-3

Update class-wc-admin-duplicate-product.php
This commit is contained in:
Mike Jolley 2014-04-07 09:23:55 +01:00
commit 0dd30d6b89
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ class WC_Admin_Duplicate_Product {
$post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$id"); $post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$id");
if (count($post_meta_infos)!=0) { if (count($post_meta_infos)!=0) {
$sql_query_sel = array();
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) "; $sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
foreach ($post_meta_infos as $meta_info) { foreach ($post_meta_infos as $meta_info) {
$meta_key = $meta_info->meta_key; $meta_key = $meta_info->meta_key;