[wp-trac] [WordPress Trac] #51556: Cannot activate a plugin which overrides pluggable function
WordPress Trac
noreply at wordpress.org
Sat Oct 17 09:02:11 UTC 2020
#51556: Cannot activate a plugin which overrides pluggable function
---------------------------+------------------------------
Reporter: superpoincare | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 5.5.1
Severity: normal | Resolution:
Keywords: close | Focuses: administration
---------------------------+------------------------------
Changes (by garrett-eclipse):
* keywords: => close
Comment:
Hello @superpoincare with your function are you wrapping it in a
function_exists? When overriding pluggable functions it's recommended to
do so to avoid the fatal you're running into.
> For safety, it is best to always wrap your functions with if (
!function_exists() ), otherwise you will produce fatal errors on plugin
activation.
Reference: https://codex.wordpress.org/Pluggable_Functions
I hope that helps overcome the issue, marking as close as this is expected
behaviour but leaving open for now incase I misunderstood.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51556#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list