| @@ -38,8 +38,11 @@ | ||
| 38 | 38 | */ |
| 39 | 39 | public function __construct() { |
| 40 | 40 | register_activation_hook( PLUGIN_FILE, array( $this, 'activate' ) ); |
| 41 | 41 | add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) ); |
| 42 | + // The staff-account rule (#1918, #2104) must hold even when WooCommerce is | |
| 43 | + // inactive and Init never starts; it depends on nothing from WooCommerce. | |
| 44 | + add_filter( 'map_meta_cap', array( Services\Permission_Rules::class, 'map_user_meta_caps' ), 10, 4 ); | |
| 42 | 45 | add_action( 'plugins_loaded', array( $this, 'init' ) ); |
| 43 | 46 | } |
| 44 | 47 | |
| 45 | 48 | /** |