Include endpoints in body class filter
This commit is contained in:
parent
27bbcb88a7
commit
d262c44534
|
@ -168,12 +168,6 @@ function wc_body_class( $classes ) {
|
||||||
if ( is_woocommerce() ) {
|
if ( is_woocommerce() ) {
|
||||||
$classes[] = 'woocommerce';
|
$classes[] = 'woocommerce';
|
||||||
$classes[] = 'woocommerce-page';
|
$classes[] = 'woocommerce-page';
|
||||||
|
|
||||||
foreach ( WC()->query->query_vars as $key => $value ) {
|
|
||||||
if ( is_wc_endpoint_url( $key ) ) {
|
|
||||||
$classes[] = "woocommerce-{$key}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elseif ( is_checkout() ) {
|
elseif ( is_checkout() ) {
|
||||||
|
@ -194,6 +188,12 @@ function wc_body_class( $classes ) {
|
||||||
if ( is_store_notice_showing() ) {
|
if ( is_store_notice_showing() ) {
|
||||||
$classes[] = 'woocommerce-demo-store';
|
$classes[] = 'woocommerce-demo-store';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ( WC()->query->query_vars as $key => $value ) {
|
||||||
|
if ( is_wc_endpoint_url( $key ) ) {
|
||||||
|
$classes[] = "woocommerce-{$key}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return array_unique( $classes );
|
return array_unique( $classes );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue