Remove one of the duplicate handlers for 'adjust_download_permissions'
This commit is contained in:
parent
f0b834d1ec
commit
10eb9f832e
|
@ -8,7 +8,6 @@
|
|||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
use Automattic\WooCommerce\Internal\DownloadPermissionsAdjuster;
|
||||
use Automattic\WooCommerce\Proxies\LegacyProxy;
|
||||
|
||||
/**
|
||||
|
@ -203,8 +202,6 @@ final class WooCommerce {
|
|||
add_action( 'switch_blog', array( $this, 'wpdb_table_fix' ), 0 );
|
||||
add_action( 'activated_plugin', array( $this, 'activated_plugin' ) );
|
||||
add_action( 'deactivated_plugin', array( $this, 'deactivated_plugin' ) );
|
||||
|
||||
DownloadPermissionsAdjuster::init_hooks();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,14 +26,6 @@ final class DownloadPermissionsAdjuster {
|
|||
add_action('adjust_download_permissions', array($this, 'adjust_download_permissions'), 10, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the hooks used by this class.
|
||||
*/
|
||||
public static function init_hooks()
|
||||
{
|
||||
add_action('adjust_download_permissions', array(wc_get_container()->get(self::class), 'adjust_download_permissions'), 10, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedule a download permissions adjustment for a product if necessary.
|
||||
* This should be executed whenever a product is saved.
|
||||
|
|
Loading…
Reference in New Issue