Giter Club home page Giter Club logo

Comments (5)

devinsays avatar devinsays commented on July 21, 2024

It works for me, but I have only been testing on local servers. I wonder if there's an issue when it takes longer to connect.

I'll do some more testing- but I guess having the button there also is a fine fallback.

from edd-theme-updater.

shazahm1 avatar shazahm1 commented on July 21, 2024

If it is a timing issue ... I use this filter to speed up, very dramatically, the response from EDD-SL. Maybe you can use it.

I basically hook into the WP init as early as possible, register the EDD post type, check for the EDD-SL remote check actions and execute them very early. I've been using them for awhile without issue. I gave the filter to @pippinsplugins and I believe he is using it on his sites too or at least he was.

// We need to register the EDD post types now b/c they
// are registered on the init hook in EDD core.
// The EDD post types needs to be registered now 
// order for get_permalink() to return the correct URL/s.
function saz_edd_sl_remote_actions_short_init() {

    $remote_actions = array( 'activate_license', 'deactivate_license', 'check_license', 'get_version' ); 

    if ( isset( $_GET['edd_action'] ) && in_array( $_GET['edd_action'], $remote_actions ) ) {

        edd_setup_edd_post_types();

        do_action( 'edd_' . $_GET['edd_action'], $_GET );
    }

    if ( isset( $_POST['edd_action'] ) && $_POST['edd_action'] == 'get_version' ) {

        edd_setup_edd_post_types();

        do_action( 'edd_get_version', $_POST );
    }

}

add_action( 'setup_theme', 'saz_edd_sl_remote_actions_short_init', -9999 );

from edd-theme-updater.

pippinsplugins avatar pippinsplugins commented on July 21, 2024

@shazahm1 I don't use that one but I do use this: https://github.com/dannyvankooten/edd-sl-api-endpoint

from edd-theme-updater.

shazahm1 avatar shazahm1 commented on July 21, 2024

@pippinsplugins neat extension ... without doing any tests, I think the filter would be quicker since the filter ends/responds sooner in the core WP execution stack. It never reaches the init hook, it dies after the response in the setup_theme hook. However the extension is probably more future proof. The things I really like are ... it is a mu-plugin, the endpoint, active plugins are filtered and crons are disabled. I think I'll have to a spend a little time and combine these. The plugin filter in the extension will definitely further improve the response time. can't wait to try it out!

Thanks for sharing the link!

from edd-theme-updater.

pippinsplugins avatar pippinsplugins commented on July 21, 2024

I'm using it on the EDD site right now and it seems to work really well.

from edd-theme-updater.

Related Issues (12)

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.