Hide Mini Cart Block on Cart and Checkout page (https://github.com/woocommerce/woocommerce-blocks/pull/5996)

* Hide Mini Cart Block on cart and checkout page woocommerce/woocommerce-blocks#5931

hide Mini Cart Block on cart and checkout page

* instead to not render nothing, use visibility hidden
This commit is contained in:
Luigi Teschio 2022-03-07 17:29:06 +01:00 committed by GitHub
parent c122008d70
commit 299f5e1bfa
1 changed files with 2 additions and 1 deletions

View File

@ -371,7 +371,8 @@ class MiniCart extends AbstractBlock {
</span>';
if ( is_cart() || is_checkout() ) {
return '<div class="' . $wrapper_classes . '">
// It is not necessary to load the Mini Cart Block on Cart and Checkout page.
return '<div class="' . $wrapper_classes . '" style="visibility:hidden" aria-hidden="true">
<button class="wc-block-mini-cart__button ' . $classes . '" aria-label="' . esc_attr( $aria_label ) . '" style="' . $style . '" disabled>' . $button_html . '</button>
</div>';
}