0

When I install my woo-commerce plugin, wordpress shows this notice:

FORCE_SSL_ADMIN already defined in /var/www/vhosts/*****.**/httpdocs/wp-config.php

When I deactivate the plugin the notice disappears. Now the strange thing is that I have never made this define inside my plugin.

Can anyone help me understand why this notice appears and how it's connected to my plugin if at all.

Thank you.

4
  • What exactly is "your woo-commerce plugin"? Are you sure that it does not define that constant a second time?
    – Nico Haase
    Feb 7, 2019 at 11:36
  • The plugin reads data from database and sends them to a REST API. It also catches events (eg customer register) and sends the data to another REST API. It also has a page in the admin panel with a form that submits the data to another REST API. Feb 7, 2019 at 12:16
  • And you are sure that the code of that plugin does not define that constant?
    – Nico Haase
    Feb 7, 2019 at 13:08
  • Yes, I made sure by searching thoroughly. Feb 8, 2019 at 14:34

1 Answer 1

8

The constant FORCE_SSL_LOGIN can be set to true to force all logins to happen over SSL. This (and all other such definitions) must be placed before

/* That's all, stop editing! Happy blogging. */

in the file, otherwise they will not take effect.

encountered the same problem and moving the code to above the line :

/* That's all, stop editing! Happy blogging. */

in wp-config.php solved the problem.

13
  • Are you sure about that? It should be irrelevant where you define a constant in your code.
    – Nico Haase
    Feb 7, 2019 at 11:35
  • This is already mention in document as well. codex.wordpress.org/Administration_Over_SSL Feb 7, 2019 at 11:38
  • No, it only mentions that the constant shall be defined before the first include of another file
    – Nico Haase
    Feb 7, 2019 at 11:41
  • This plugin for what? Feb 7, 2019 at 11:42
  • What do you mean by that question?
    – Nico Haase
    Feb 7, 2019 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.