Skip to content

Instantly share code, notes, and snippets.

@mehedicsit
Created February 22, 2019 07:00
Show Gist options
  • Save mehedicsit/a77a3db20ae09b5d910b56eaaf5b961c to your computer and use it in GitHub Desktop.
Save mehedicsit/a77a3db20ae09b5d910b56eaaf5b961c to your computer and use it in GitHub Desktop.
Add remove product button on woocommerce checkout page
add_action('woocommerce_review_order_before_payment','code4webs_remove_product_checkout');
function code4webs_remove_product_checkout(){ ?>
<style>
.woocommerce-checkout-review-order-table{
display:none;
}
#order_review_heading{
display:none;
}
/*cart remove button on checkout page */
.cartpage-on-checkout th.product-thumbnail {
display: none;
}
.cartpage-on-checkout th.product-price {
display: none;
}
.cartpage-on-checkout th.product-quantity {
display: none;
}
.cartpage-on-checkout td.product-thumbnail {
display: none;
}
.cartpage-on-checkout td.product-price {
display: none;
}
.cartpage-on-checkout td.product-quantity {
display: none;
}
.cartpage-on-checkout .woocommerce-message {
display: none;
}
</style>
<br>
<?php
echo '<h6> Your Order </h6> ';
echo '<div class="cartpage-on-checkout">';
echo do_shortcode( ' [woocommerce_cart] ' );
echo '</div>';
}
@mehedicsit
Copy link
Author

Add this code to functions.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment