Title: Custom fields duplication
Last modified: August 22, 2016

---

# Custom fields duplication

 *  [Mike H](https://wordpress.org/support/users/mtnweekly/)
 * (@mtnweekly)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/)
 * Has this been addressed? I dont want 12 schema_price_currency and 12 schema_product_price
   custom fields for each post? What is going on with this Plugin?
 * [https://wordpress.org/plugins/author-product-review/](https://wordpress.org/plugins/author-product-review/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [jh20001](https://wordpress.org/support/users/jh20001/)
 * (@jh20001)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218149)
 * The answer is here: [http://wordpress.org/support/topic/multiple-duplicate-table-entries?replies=8](http://wordpress.org/support/topic/multiple-duplicate-table-entries?replies=8)
 *  Thread Starter [Mike H](https://wordpress.org/support/users/mtnweekly/)
 * (@mtnweekly)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218163)
 * This is not an answer. How do we report this to WordPress? The plugin is acting
   rouge
 *  [jh20001](https://wordpress.org/support/users/jh20001/)
 * (@jh20001)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218164)
 * It does indeed act as a solution. I did it myself on two different installations
   and the fields are no longer duplicating. It of course won’t go back and correct
   the duplications that have already been made, but solves it for any posts in 
   the future.
 * There doesn’t appear to be a way to submit anything directly to WordPress’s authors
   in regards to plugins. This post also shows in the main support forum as well(
   [http://wordpress.org/support/forum/plugins-and-hacks](http://wordpress.org/support/forum/plugins-and-hacks))
 *  Thread Starter [Mike H](https://wordpress.org/support/users/mtnweekly/)
 * (@mtnweekly)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218165)
 * Yes however this is a plugin correct for people to install onto their site and
   go from their. I am no a programer or html wizard. Can someone walk me through
   the steps?
 *  [jh20001](https://wordpress.org/support/users/jh20001/)
 * (@jh20001)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218166)
 * None of us would be where we are today if someone didn’t take the time to do 
   that.
 * 1) Login to your WordPress admin screen. Go to “Plugins” and search for Author
   Product Review in the list. Under the title of the plugin, you will see “Edit”(
   click on that).
 * 2) Scroll all the way down towards the bottom and you will find the following
   code (don’t edit any lines before or after it):
 *     ```
       if(!update_post_meta($post_id, 'schema_product_name', $productName))
       		add_post_meta($post_id, 'schema_product_name', $productName);
   
       	if(!update_post_meta($post_id, 'schema_product_price', $productPrice))
       		add_post_meta($post_id, 'schema_product_price', $productPrice);	
   
               if(!update_post_meta($post_id, 'schema_price_currency', $priceCurrency))
       		add_post_meta($post_id, 'schema_price_currency', $priceCurrency);	
   
       	if(!update_post_meta($post_id, 'schema_rating', $rating))
       		add_post_meta($post_id, 'schema_rating', $rating);
       ```
   
 * 3) Replace that code with the following:
 *     ```
       update_post_meta($post_id, 'schema_product_name', $productName);
   
       update_post_meta($post_id, 'schema_product_price', $productPrice);
   
       update_post_meta($post_id, 'schema_price_currency', $priceCurrency);
   
       update_post_meta($post_id, 'schema_rating', $rating);
       ```
   
 * 4) Scroll below the editing area and click on “Update File”.
 * You should be set 🙂
 * If anything goes wrong and you wind up messing up your script (you won’t as long
   as you don’t edit any other lines), the member “hqarrse3” created a copy of the
   file for people to download with the changes already made ([http://www.arrse.co.uk/olive_scripts/author-product-review.php.txt](http://www.arrse.co.uk/olive_scripts/author-product-review.php.txt)).
   Just rename the file to remove the “.txt” at the end and upload it via FTP to
   the plugin folder replacing the original file.
 * I agree that the author should be watching these threads and offer at least a
   small update so that everyone doesn’t have to do this. Especially when the answer
   is handed to them and they don’t have to do any of the work. I am surprised they
   don’t do that. A small bit of community service goes a long way in creating a
   happy following.
 *  Thread Starter [Mike H](https://wordpress.org/support/users/mtnweekly/)
 * (@mtnweekly)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218171)
 * jh you rock!
 *  [jh20001](https://wordpress.org/support/users/jh20001/)
 * (@jh20001)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218172)
 * 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Custom fields duplication’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/author-product-review_eedef5.svg)
 * [Author Product Review](https://wordpress.org/plugins/author-product-review/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/author-product-review/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/author-product-review/)
 * [Active Topics](https://wordpress.org/support/plugin/author-product-review/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/author-product-review/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/author-product-review/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [jh20001](https://wordpress.org/support/users/jh20001/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/custom-fields-duplication-1/#post-5218172)
 * Status: not resolved