• Resolved hasantaqvi

    (@hasantaqvi)


    Hi!

    I use ajax in my instalment payment gateway to show fee based on the bank. Once the bank is selected, it shows the desired fee in checkout. The issue is, if I enable the firewall in NinjaFirewall, the ajax loads too slow, around 5-7 seconds, and sometimes even it shows loading and after loading it changes nothing, it caches the old bank’s fee. But, once I disable the firewall, it works like a charm, loads within a second.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Is that a plugin or custom code that you are using ? Does it use PHP sessions ?
    Do you see anything related to the AJAX call in the firewall log (NinjaFirewall > Logs) ?
    Do you see any error or warning if you go to “Tools > Site Health” ?

    Thread Starter hasantaqvi

    (@hasantaqvi)

    Yes, it is a custom plugin. But, I’m not sure about the PHP Session, but I think there aren’t. Also, there’s no error in Site Health. I can share the code with you, but how? should I email you?

    Need your help asap on this as this plugin is essential for our sales. Thanks.

    • This reply was modified 7 months, 3 weeks ago by hasantaqvi.
    Thread Starter hasantaqvi

    (@hasantaqvi)

    Awaiting response.

    Plugin Author nintechnet

    (@nintechnet)

    Look in your code for substrings such as session_start, that will tell you whether it deals with PHP sessions or not.
    Also, use your browser’s console to check for error ( CTRL +Shift + J) during that AJAX request, and look at the “Console” tab.

    Thread Starter hasantaqvi

    (@hasantaqvi)

    Hi, it doesn’t have PHP session. Also, no error in the console.

    Plugin Author nintechnet

    (@nintechnet)

    Can you enable debugging in WordPress and see if there’s anything written to the PHP error log?

    1. Edit your wp-config.php file.
    2. Search for:
      define('WP_DEBUG', false);
    3. Replace with:
      define('WP_DEBUG', true);
    4. Add this line below:
      define('WP_DEBUG_LOG', true );

    Check the log, if any, which will be saved to “/wp-content/debug.log”.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘AJAX or JS Issue’ is closed to new replies.