Forums

wp_create_nonce() returns the same every time (1 post)

  1. emmern
    Member
    Posted 1 year ago #

    Hey.

    I am getting a nonce through admin-ajax.php like this:

    add_action('wp_ajax_test_ajax', 'test_ajax');
    function test_ajax(){
    	global $wpdb;
    	echo $nonce = wp_create_nonce();
    	echo wp_verify_nonce($nonce);
    	die('It worked. Wo - ho.');
    }

    But that always return the same value, and this is really frustrating, because it's not supposed to be like that.

    Any help would be appreciated greatly.

Topic Closed

This topic has been closed to new replies.

About this Topic