Skip to content

Instantly share code, notes, and snippets.

@woogist
Last active March 29, 2023 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogist/827d8baa2c68fac5087faa36171b4083 to your computer and use it in GitHub Desktop.
Save woogist/827d8baa2c68fac5087faa36171b4083 to your computer and use it in GitHub Desktop.
Remove the product warrant text from above the add to cart button on a product page
add_action( 'woocommerce_before_add_to_cart_button', 'woo_remove_product_warranty', 9);
function woo_remove_product_warranty() {
global $warranty_cart;
remove_action( 'woocommerce_before_add_to_cart_button', array( $warranty_cart, 'show_product_warranty' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment