The symptom is repeated LinkedIn sharing after normal edits
WP LinkedIn Auto Publish should share a post when it is first published. In this bug, editing an already-published post can trigger another LinkedIn share as if the post were new.
That means a typo fix, link update, SEO title tweak, or added paragraph can become an unintended social post. The cause is small, but the audience impact is visible.
This matters when:
The bug is a publish-status check without the old-status guard
The plugin checks the new post status, but the safe decision also needs to know whether the post was already published.
Current trigger
The buggy condition is if ( ‘publish’ === $new_status ) {. It fires whenever the new status is publish.
Missing guard
The condition does not check $old_status, so an update to an existing published post can look like a first publish event.
Safer condition
The fixed condition is if ( ‘publish’ === $new_status && ‘publish’ !== $old_status ) {. That limits the share to a transition into publish.
The risk is not only technical
Repeated LinkedIn posts can make normal editorial maintenance look like spam to followers.
The manual fix is also not risk-free: direct plugin edits can be overwritten by plugin updates, so the decision depends on comfort with PHP and the urgency of the problem.
Before choosing a fix, keep these risks visible:
How the one-line fix works
The fix adds one extra condition: only share when a post moves into publish, not when it was already published.
Find
Replace
Why
Where
Caution
The important idea is the transition: share when a post becomes published, not whenever a saved post still has published status.
What to do if you are affected now
The right action depends on who maintains the site and how urgent the LinkedIn re-share problem is.
If you are comfortable with PHP
- Back up the site or plugin file before editing.
- Change the publish-status condition to include the old-status guard.
- Test with a draft-to-publish transition and then a normal edit to an already-published post.
If you are not comfortable editing PHP
- Avoid nonessential edits to published posts while the bug is active.
- Ask a developer to apply and test the temporary fix.
- Watch for an official plugin update that includes the corrected condition.
How to verify the behavior
A good test should prove both sides: first publish still shares, later edit does not re-share.
The test passes only when first publication can still share while later edits stay quiet.
Frequently asked questions
Why does WP LinkedIn Auto Publish re-share edited posts?
The bug comes from checking only whether the new post status is publish. Without checking the old status, edits to already-published posts can trigger the same share logic.
What is the one-line fix?
Add an old-status guard: if ( ‘publish’ === $new_status && ‘publish’ !== $old_status ) {.
Will a manual plugin edit survive updates?
Usually no. Direct edits to plugin files can be overwritten when the plugin updates, so treat the manual change as temporary unless it is handled through an update-safe approach.
Choose the safest next action for the site
The fix is small, but the operational choice matters because it touches social publishing and plugin code.
1
2
3
4
The bottom line: this is a known one-line trigger bug. The safest behavior is to share only when a post transitions into published status, not every time a published post is saved.
