edd-theme-updater icon indicating copy to clipboard operation
edd-theme-updater copied to clipboard

Still need to click Activate License button

Open samikeijonen opened this issue 11 years ago • 5 comments

When I enter license key and save, I still need to click Activate License button after that and then license is activated.

Are you having the same "issue"?

samikeijonen avatar Jun 11 '14 10:06 samikeijonen

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.

devinsays avatar Jun 11 '14 17:06 devinsays

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 );

shazahm1 avatar Oct 02 '14 22:10 shazahm1

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

pippinsplugins avatar Oct 03 '14 14:10 pippinsplugins

@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!

shazahm1 avatar Oct 03 '14 15:10 shazahm1

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

pippinsplugins avatar Oct 06 '14 01:10 pippinsplugins