0

anyone encountered this bug that it will work when you are logged in but once you log out it won't work anymore.

this is a very simple plugin that will fetch zip code and display the corresponding rate.

here's the code. https://pastebin.com/TPFYJFCP

TIA!

1

You want to use wp_ajax_nopriv_ for handling ajax for non-authenticated users:

// logged-out users
add_action( 'wp_ajax_nopriv_my_action_search_key_press', 'action_search_key_press_callback' );

// authenticated users
add_action( 'wp_ajax_my_action_search_key_press', 'action_search_key_press_callback' );
  • UPDATE: it works now, tested on incognito as well and even with other browsers. – Menj Sep 20 '17 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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