Fixes PHP errors caused by linting fixes (https://github.com/woocommerce/woocommerce-admin/pull/650)
This commit is contained in:
parent
cb69cf1051
commit
a29799eb85
|
@ -65,8 +65,9 @@ function wc_admin_get_embed_breadcrumbs() {
|
|||
'wc-settings' => 'general',
|
||||
'wc-status' => 'status',
|
||||
);
|
||||
$tab = '';
|
||||
$get_tab = isset( $_GET['tab'] ) && sanitize_text_field( wp_unslash( $_GET['tab'] ) );
|
||||
if ( ! isset( $_GET['page'] ) ) {
|
||||
if ( isset( $_GET['page'] ) ) {
|
||||
if ( in_array( wp_unslash( $_GET['page'] ), array_keys( $pages_with_tabs ) ) ) {
|
||||
$tab = ! empty( $get_tab ) ? $get_tab . '-' : $pages_with_tabs[ $get_page ] . '-';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue