Even if I set the settings to redirect to the home page, it always redirects to %homepage%/#?oa_social_login_source=shortcode.
I insert the shortcode with do_shortcode('[oa_social_login]') in the ajax call php function and return the rendered string in a json structure like this:
...
$registration = str_replace('"',"'",do_shortcode('[oa_social_login]'));
$registration = str_replace("\n","",$registration);
$registration = str_replace("\r","",$registration);
$response->registration=$registration;
echo json_encode($response);
wp_die();
...
thanks for your help!
jluc
Answers
what code does this command generates?
echo json_encode($response);