Storefront compatibility for sticky proceed to checkout button on mobile (https://github.com/woocommerce/woocommerce-blocks/pull/1999)

* Storefront compatibility

* Remove storefront actions
This commit is contained in:
Mike Jolley 2020-04-06 12:50:33 +01:00 committed by GitHub
parent 4baa99cf65
commit 3ac335e1f9
2 changed files with 13 additions and 1 deletions

View File

@ -233,7 +233,10 @@ table.wc-block-cart-items {
padding: $gap;
position: fixed;
width: 100%;
z-index: 1;
z-index: 9999;
}
.wc-block-cart__submit-container-push {
height: 100px;
}
}
.wc-block-cart-coupon-list {

View File

@ -52,6 +52,15 @@ class Cart extends AbstractBlock {
do_action( 'woocommerce_blocks_enqueue_cart_block_scripts_before' );
$this->enqueue_assets( $attributes );
do_action( 'woocommerce_blocks_enqueue_cart_block_scripts_after' );
// Add placeholder element to footer to push content for the sticky bar on mobile.
add_action(
'wp_footer',
function() {
echo '<div class="wc-block-cart__submit-container-push"></div>';
}
);
return $content . $this->get_skeleton();
}