-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix auto-posting tweets for automatically published posts. #294
Conversation
Hi, Great, how can we install the new version? |
@iamdharmesh I tested this but it doesn't appear to be working for me, see the gif below. Along with WP CLI, I also tried the code above using the |
@sunnmagic this fix is not yet ready or part of a released version but for now we're targeting this in the 2.2.0 release. |
Ok I see, do you know when it will be released?
Le 27 nov. 2023 à 17:47 +0100, Jeffrey Paul ***@***.***>, a écrit :
… @sunnmagic this fix is not yet ready or part of a released version but for now we're targeting this in the 2.2.0 release.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM.
I re-tested and discovered I was hitting a false negative in AST_Staging::is_production_site()
when testing via WP-CLI earlier.
The code wasn't working for me on init
as I was registering it as an mu-plugin on init, 10
so it running prior to the plugin registering post support (as discussed offline yesterday).
@iamdharmesh, you mentioned changing the post type support function to run earlier on init
but I don't think that will work as the common code example for registering post type is:
add_action( 'init', /* register_post_type() */ );
So registering post type support prior to init, 10
will miss any CPTs that are registered by plugins. If anything we should probably register it later on the init hook.
It might be worth testing that in a follow up issue though. I think this can be merged as is.
Description of the Change
The PR addresses issues with auto-posting tweets for automatically published posts. Currently, tweets are posted based only on tweet accounts saved in post meta, and these tweet accounts are saved to post meta in the edit post screen. Because of this, when posts are automatically published, they don't get tweeted. The PR resolves this issue by tweeting posts to accounts with auto-share enabled by default when post meta is not saved in the post.
Closes #287
Closes #286
How to test the Change
Changelog Entry
Credits
Props @iamdharmesh @sunnmagic
Checklist: