Include endpoints in body class filter

This commit is contained in:
Jack Gregory 2015-03-16 13:26:22 +00:00
parent 27bbcb88a7
commit d262c44534
1 changed files with 6 additions and 6 deletions

View File

@ -168,12 +168,6 @@ function wc_body_class( $classes ) {
if ( is_woocommerce() ) {
$classes[] = 'woocommerce';
$classes[] = 'woocommerce-page';
foreach ( WC()->query->query_vars as $key => $value ) {
if ( is_wc_endpoint_url( $key ) ) {
$classes[] = "woocommerce-{$key}";
}
}
}
elseif ( is_checkout() ) {
@ -195,6 +189,12 @@ function wc_body_class( $classes ) {
$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 );
}