Giter Site home page Giter Site logo

Comments (4)

kagg-design avatar kagg-design commented on August 30, 2024

Thank you.

I will add this feature on weekend.

from disable-plugins.

1000camels avatar 1000camels commented on August 30, 2024

Wonderful.

I hacked together something that worked, but i suspect your version will be better.

A few notes for you. Woocommerce Ajax calls are not recognized by wp_doing_ajax (not sure why).
I resolved this with this in your plugin:

add_filter( 'wp_doing_ajax', function( $is_doing_ajax ) {
if( isset($_REQUEST['wc-ajax']) ) {
return true;
}
},1);

I've also been doing a lot of research on performance issues with ajax and many people are saying that wc-ajax style calls are lighter than admin-ajax.php, which might explain the shift. Although I do not know yet why it is happening. But your plugin is amazing and will likely solve some series issues I have been having.

One other thing I noticed. Your 'enabled_plugins' did not do what I thought it would. It is not a whitelist, but rather a way to add unactivated plugins. Pretty neat, but wondering whether it would be nice to have a setting to say just load this group of plugins, bypassing both disabled_plugins and enabled_plugins. The reason I am using your plugin is that I have a few calls which really only need woocommerce. I would love to be able to just specify a few plugins.

from disable-plugins.

1000camels avatar 1000camels commented on August 30, 2024

The only other thing I stumbled on was syntax errors in my json, which perhaps could be caught earlier and send a message to error_log.

from disable-plugins.

kagg-design avatar kagg-design commented on August 30, 2024

The filter you proposed works, allowing the plugin to check filters for the action. But because there is no $_POST['action'] in wc-ajax request, the plugin does nothing.

I have added the relevant code and tests to the plugin, so now under tag 1.3 it can filter wc-ajax. Use location ajax for it.

from disable-plugins.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.