Display Webhooks menu when the WC API is activated
This commit is contained in:
parent
a90854609a
commit
2aeee0169a
|
@ -366,18 +366,33 @@ class WC_Post_types {
|
|||
register_post_type( 'shop_webhook',
|
||||
apply_filters( 'woocommerce_register_post_type_shop_webhook',
|
||||
array(
|
||||
'label' => __( 'Webhooks', 'woocommerce' ),
|
||||
'labels' => array(
|
||||
'name' => __( 'Webhooks', 'woocommerce' ),
|
||||
'singular_name' => __( 'Webhook', 'woocommerce' ),
|
||||
'menu_name' => _x( 'Webhooks', 'Admin menu name', 'woocommerce' ),
|
||||
'add_new' => __( 'Add Webhook', 'woocommerce' ),
|
||||
'add_new_item' => __( 'Add New Webhook', 'woocommerce' ),
|
||||
'edit' => __( 'Edit', 'woocommerce' ),
|
||||
'edit_item' => __( 'Edit Webhook', 'woocommerce' ),
|
||||
'new_item' => __( 'New Webhook', 'woocommerce' ),
|
||||
'view' => __( 'View Webhooks', 'woocommerce' ),
|
||||
'view_item' => __( 'View Webhook', 'woocommerce' ),
|
||||
'search_items' => __( 'Search Webhooks', 'woocommerce' ),
|
||||
'not_found' => __( 'No Webhooks found', 'woocommerce' ),
|
||||
'not_found_in_trash' => __( 'No Webhooks found in trash', 'woocommerce' ),
|
||||
'parent' => __( 'Parent Webhook', 'woocommerce' )
|
||||
),
|
||||
'public' => false,
|
||||
'show_ui' => false,
|
||||
'show_ui' => ( current_user_can( 'manage_woocommerce' ) && 'yes' == get_option( 'woocommerce_api_enabled' ) ),
|
||||
'capability_type' => 'shop_webhook',
|
||||
'map_meta_cap' => true,
|
||||
'publicly_queryable' => false,
|
||||
'exclude_from_search' => true,
|
||||
'show_in_menu' => false,
|
||||
'show_in_menu' => 'woocommerce',
|
||||
'hierarchical' => false,
|
||||
'rewrite' => false,
|
||||
'query_var' => false,
|
||||
'supports' => false,
|
||||
'supports' => array( 'title' ),
|
||||
'show_in_nav_menus' => false,
|
||||
'show_in_admin_bar' => false,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue