• Resolved jeff412

    (@jeff412)


    We use the duplicate option in WooCommerce to list our products, but the “edit publicize” option is grayed out. However, publicize still pushes every product to twitter, facebook, etc. I only want to push selected items out. How can I re-enable these options?

    Jeff

    https://www.ads-software.com/plugins/jetpack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    To keep track of Publicized posts, and avoid triggering Publicized by mistake every time you make changes to a post that’s already been published, Jetpack stores the Publicize status of each post in post meta. Unfortunately, when you duplicate a product in Woocommerce, you also duplicate all meta data attached to that post, and consequently copy the status of each checked publicized box.

    Luckily, Woocommerce includes a filter, woocommerce_duplicate_product_exclude_meta, that will allow you to exclude specific post meta when duplicating products:
    https://github.com/woothemes/woocommerce/blob/master/includes/admin/class-wc-admin-duplicate-product.php#L240

    I’d suggest excluding all post meta that includes the terms mentioned here:
    https://github.com/Automattic/jetpack/blob/3.9.1/modules/publicize/publicize.php#L17

    I hope this helps.

    Hi there
    ..And as always thanks for your input, particularly from a newcomer on a steep learning curve ??

    Regarding your answer re – Publicized Posts (an issue I’m experiencing also) you provide two links to code, so to clarify which file should either code be pasted into eg a Woocommerce file, or a function.php file of the child theme…Canvas in my case?
    And beginning at L240 or L17 and ending where?
    Your help always appreciated ??

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    @mudisland You’ll want to avoid editing plugin files, so I’d recommend using the filter via a function you’ll add to your child theme’s functions.php file, as you mentioned. That’s always the right thing to do! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Publicize Edit options grayed out for duplicated posts’ is closed to new replies.