Activity Panel: Hide Reviews Panel when Reviews are Disabled (https://github.com/woocommerce/woocommerce-admin/pull/1852)
This commit is contained in:
parent
b6b00848c0
commit
2f20720927
|
@ -112,13 +112,15 @@ class ActivityPanel extends Component {
|
|||
icon: <Gridicon icon="clipboard" />,
|
||||
unread: false,
|
||||
},
|
||||
{
|
||||
'yes' === wcSettings.reviewsEnabled
|
||||
? {
|
||||
name: 'reviews',
|
||||
title: __( 'Reviews', 'woocommerce-admin' ),
|
||||
icon: <Gridicon icon="star" />,
|
||||
unread: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
: null,
|
||||
].filter( Boolean );
|
||||
}
|
||||
|
||||
getPanelContent( tab ) {
|
||||
|
|
|
@ -195,6 +195,7 @@ function wc_admin_print_script_settings() {
|
|||
),
|
||||
'currentUserData' => $current_user_data,
|
||||
'alertCount' => WC_Admin_Notes::get_notes_count( 'error,update', 'unactioned' ),
|
||||
'reviewsEnabled' => get_option( 'woocommerce_enable_reviews' ),
|
||||
);
|
||||
$settings = wc_admin_add_custom_settings( $settings );
|
||||
|
||||
|
|
Loading…
Reference in New Issue