Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Mike H

    (@mtnweekly)

    This is not an answer. How do we report this to WordPress? The plugin is acting rouge

    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)

    Thread Starter Mike H

    (@mtnweekly)

    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?

    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). 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

    (@mtnweekly)

    jh you rock!

    🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom fields duplication’ is closed to new replies.