WC_Auth::get_i18n_scope()protectedWC 2.4.0

Get scope name.

Method of the class: WC_Auth{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_i18n_scope( $scope );
$scope(string) (required)
Permission scope.

Changelog

Since 2.4.0 Introduced.

WC_Auth::get_i18n_scope() code WC 9.4.2

protected function get_i18n_scope( $scope ) {
	$permissions = array(
		'read'       => __( 'Read', 'woocommerce' ),
		'write'      => __( 'Write', 'woocommerce' ),
		'read_write' => __( 'Read/Write', 'woocommerce' ),
	);

	return $permissions[ $scope ];
}