My hosting provider does not have curl extension enabled by default, however, I can load it using dl().
What would be the correct place in WordPress to load the extension so that it could use curl for wp_remote_* functions?
I’d like it to survive the possible upgrades of WordPress code.
The earliest hook I know of is
init. My recommendation would be to build this as a plug-in (so that it will survive upgrades) and do the following:—- EDIT —-
It looks like there are some hooks that fire before
init. I recommend trying to hook toload_textdomaininstead. This is the hook that loads language and translation functions (the only hook that fires earlier ismuplugins_loadedwhich might not work in non-mu installations).So:
add_action('load_textdomain', 'load_curl_functions');should load your curl extension before doing anything else …