Created
September 29, 2023 12:27
-
-
Save finalwebsites/9ed4dada310c098a4f9d52628fdf90f2 to your computer and use it in GitHub Desktop.
WordPress hooks add-to-cart button replacement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'woocommerce_is_purchasable', '__return_false'); // disable the default button | |
add_action( 'woocommerce_single_product_summary', 'fw_add_offer_request_button', 30 ); | |
function fw_add_offer_request_button(){ | |
echo '<button>Offerte aanvragen</button>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment