Publicize: Add Global Option To Remove Publicize For Custom Post Types (WooCommerce Products)
The Issue
Currently, Publicize is enabled for WooCommerce products (and all post types for that matter) by default. Not all WooCommerce customers like their products being shared to Social Media when they add these products in their site. While it is possible to limit the use of the publicize feature on a per-product basis, it would be super-convenient for customers, if publicize could be restricted in a post-type basis (as in the case with WooCommerce Products).
Steps to reproduce the issue
- Install JetPack with Publicize enabled in a WooCommerce store with products.
- Try adding a new product to the WooCommerce store.
- You will notice that the product gets shared immediately on the Social Media profiles that are enabled.
Workaround
Currently, the only way to limit post type support on a per-post-type basis, would be to call the remove_post_type_support function, in the init hook. For instance - this snippet removes WooCommerce products from publicize:
add_action('init', 'woo_publicize_remove');
function woo_publicize_remove() {
remove_post_type_support( 'product', 'publicize' );
}
It would be a lot easier for customers if this feature was built-in, so that they won't have to use code snippets for the same.
Thanks!
Also in 779849-zen
Brought up again in 1824594-hc
1068331-zen
1193887-zen
1193355-zen
Hi all, currently using this workaround but I agree with @harishankerr that being able to control which post types are publicized (perhaps via something like a series of checkboxes in the Jetpack dashboard) would be ideal. I didn't find this workaround right away and ended up having the choice of either manually posting on all my social channels, or using publicize and deleting posts that appeared as a result of new products being added in woocommerce.
This issue has been marked as stale. This happened because:
- It has been inactive in the past 6 months.
- It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Brought up again in 18968885-hc
Also to note when importing test data the products are published and if Publicize is enabled the test products are shared on social media. If there was a way to turn off that option or provide a warning that the products will be shared on social media that would be helpful.
Requested in 22055109-hc.
This issue has been marked as stale. This happened because:
- It has been inactive in the past 6 months.
- It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Confirming this is still an issue.
Internal: 28203806-hc
Same case in 3816903-zd.
Requested on forums in https://wordpress.org/support/topic/is-it-possible-to-share-posts-with-jetpack-but-not-woo-commerce-products/
Good idea but not needed when you can ad a tiny code snippet.
mentioned here: 6673200-zd-a8c applied workaround
Support References
This comment is automatically generated. Please do not edit it.
- [ ] 779849-zen
- [ ] 1068331-zen
- [ ] 1193887-zen
- [ ] 1193355-zen
- [ ] 3816903-zen
- [ ] 6673200-zen
- [ ] 7539949-zen
Also mentioned here: 7539949-zen
Provided the code snippet