I tried that filter for ‘publicize_checkbox_default’ and it doesn’t seem to have any effect for me.
Once you add the filter, the Publicize options are still there but they’re unchecked by default, like so:
https://i.wpne.ws/Swja
But the issue for me is that Publicize is using the same oauth to social media sites in both environments. If I disconnect them all in development, then they are also disconnected in production.
I’m not sure how you managed to do that: 2 different sites should not be able to share the same Jetpack connection, let alone the same Publicize connections.
I guess I don’t really understand how your development site is set, and how you deploy from the dev site to production.
Do you use the same site URL on both sites, and switch from one to the other by editing your hosts’ file?
If you use a different URL on your staging site, you can separate the 2 Jetpack installations by going to the Jetpack menu in your dashboard, and disconnecting then reconnecting to WordPress.com. It will create a new connection for your dev site, and you will then be able to make changes on your dev site (like deactivating the Publicize module) without affecting the production site.
You will then need to make sure you don’t copy the jetpack_options
row (in wp_options
) when copying the database from dev to prod.
I hope this helps.