Remove a button from WooCommerce Checkout page


So we have customized products on our online shop and have this review button for it, in case if customers want to check their personalized product quickly. There is this code in theme.php

public function woocommerce_get_item_data_add_patch_modal($data, $cart_item)

    if (isset($cart_item['hasIndividualisation'])) {
        $cart_data = $cart_item['data'];
        $preview_link = ' class="preview" onclick="handlePreviewClick(this, event)" href="/wp-json/konfigurator/preview/' . $cart_item['key'] . '"';
        echo '<Button' . $preview_link .'>Review</Button>';

    return $data;

It works just fine in cart. However the checkout page in ‘review cart’ sidebar
the button appears but doesn’t load the personalized product.
We would like to remove this button only from the checkout page.

Nandin 4 months 0 Answers 11 views 0

Leave an answer