Automattic\WooCommerce\Blueprint\Importers
ImportRunSql::check_step_capabilities
Check if the current user has the required capabilities for this step.
Method of the class: ImportRunSql{}
No Hooks.
Returns
true|false. True if the user has the required capabilities. False otherwise.
Usage
$ImportRunSql = new ImportRunSql(); $ImportRunSql->check_step_capabilities( $schema ): bool;
- $schema(object) (required)
- The schema to process.
ImportRunSql::check_step_capabilities() ImportRunSql::check step capabilities code WC 10.7.0
public function check_step_capabilities( $schema ): bool {
if ( ! current_user_can( 'manage_options' ) ) {
return false;
}
if ( ! current_user_can( 'edit_posts' ) ) {
return false;
}
if ( ! current_user_can( 'edit_users' ) ) {
return false;
}
return true;
}