Merge pull request #7735 from jackgregory/patch-1
Include endpoints in body class filter
This commit is contained in:
commit
bf8f7ba248
|
@ -189,6 +189,12 @@ function wc_body_class( $classes ) {
|
||||||
$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