-
Hi Hasan,
Following your training, I asked ChatGPT and got the conflict resolved—thanks!
This is ChatGPT’s reply:
The reason you cannot activate both snippets at the same time in WordPress is because they define the same functions and hooks, which leads to function name conflicts and duplicate REST route registrations.
🔍 What’s the conflict?
Both snippets define the same function names:-
generate_simple_captcha()
-
verify_captcha()
-
generate_in_json()
And both register the same REST route:
register_rest_route(‘api/v1’, ‘/idea-generator’, […])
This causes a “function already declared” or “route already registered” conflict when WordPress tries to activate the second snippet
-
This reply was modified 2 weeks, 1 day ago by
Hasan.
-