• Resolved amihaidany

    (@amihaidany)


    Hello,

    First of all, thank you very much for this plugin. πŸ™‚

    May i ask for a better and dynamic way to retrieve nonce? Via JS.
    Caching plugins are caching the nonce, thus making the plugin useless.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Zorem

    (@zorem)

    Hi,
    Our plugin does not generate a nonce, we just do an ajax process instead of page loading.
    we use the native WooCommerce my account form.

    which caching plugin are you using? we are using the fastest cache pro and we do not have caching issues.

    Let me know what do you think?

    Thread Starter amihaidany

    (@amihaidany)

    Hello,

    Thank you for your reply! πŸ™‚

    on ‘woocommerce-ajax-login-register.php’, on line 199, you have this:

    // First check the nonce, if it fails the function will break
    check_ajax_referer( 'woocommerce-login', 'woocommerce-login-nonce' );
    

    This is the nonce check, that doesn’t work with WP rocket caching plugin.

    It gets the nonce from an input field in the woocommerce login form, with id ‘woocommerce-login-nonce’.

    And why would it work? If it doesn’t get the nonce dynamically via AJAX or something like that, it’ll be “burned” to all cached HTML files.

    Thank you,
    Amichai

    • This reply was modified 3 years, 5 months ago by amihaidany.
    • This reply was modified 3 years, 5 months ago by amihaidany.
    • This reply was modified 3 years, 5 months ago by amihaidany.
    • This reply was modified 3 years, 5 months ago by amihaidany.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dynamic nonce loading – for use with cache plugins’ is closed to new replies.