Improved the access to the keys/apps section in api tab

This commit is contained in:
Claudio Sanches 2015-05-15 17:14:31 -03:00
parent eb6f25b47b
commit 572712cb52
1 changed files with 7 additions and 3 deletions

View File

@ -42,11 +42,15 @@ class WC_Settings_Rest_API extends WC_Settings_Page {
*/
public function get_sections() {
$sections = array(
'' => __( 'Settings', 'woocommerce' ),
'keys' => __( 'Keys', 'woocommerce' ),
'webhooks' => __( 'Webhooks', 'woocommerce' ),
'' => __( 'Settings', 'woocommerce' )
);
if ( current_user_can( 'edit_user' ) ) {
$sections['keys'] = __( 'Keys/Apps', 'woocommerce' );
}
$sections['webhooks'] = __( 'Webhooks', 'woocommerce' );
return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections );
}