error for remote validation
-
Hi i have followed every step of the encoding as you have suggested and have changed few field
add_action( ‘wp_ajax_nopriv_get_user_information’,’smartform_ext_get_user_information’);
add_action( ‘wp_ajax_get_user_information’,’smartform_ext_get_user_information’);function smartform_ext_get_user_information(){
$current_user = wp_get_current_user();
if($current_user==false)
return “{}”;echo json_encode(array(
“name”=>$current_user->user_firstname. ‘ ‘. $current_user->user_lastname,
“order id”=>$current_user->user_order_id,
“products”=>$current_user->user_products
));
die();}
but when i enter the function Remote.Post(ajaxurl,{“action”: “get_user_information”}).name for name it gives me error remote is not defined please guide where i am doing wrong
much thanks
- The topic ‘error for remote validation’ is closed to new replies.