Automattic\WooCommerce\Blocks\BlockTypes
ProductButton::get_view_cart_html
Get the view cart link html.
Method of the class: ProductButton{}
No Hooks.
Returns
String. The view cart html.
Usage
// private - for code of main (parent) class only $result = $this->get_view_cart_html();
ProductButton::get_view_cart_html() ProductButton::get view cart html code WC 10.7.0
private function get_view_cart_html() {
return sprintf(
'<span
hidden
data-wp-bind--hidden="!state.displayViewCart"
>
<a
href="%1$s"
class="added_to_cart wc_forward"
title="%2$s"
>
%3$s
</a>
</span>',
esc_url( wc_get_cart_url() ),
esc_attr__( 'View cart', 'woocommerce' ),
esc_html__( 'View cart', 'woocommerce' )
);
}