Clear woocommerce_plugin_background_installer event

This commit is contained in:
Mike Jolley 2016-12-12 12:02:03 +00:00
parent 306c4f8a2d
commit dcb5211adf
1 changed files with 3 additions and 0 deletions

View File

@ -929,6 +929,9 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
* @since 2.6.0
*/
public static function background_installer( $plugin_to_install_id, $plugin_to_install ) {
// Explicitly clear the event.
wp_clear_scheduled_hook( 'woocommerce_plugin_background_installer', func_get_args() );
if ( ! empty( $plugin_to_install['repo-slug'] ) ) {
require_once( ABSPATH . 'wp-admin/includes/file.php' );
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );