Created
October 1, 2025 12:59
-
-
Save plugin-republic/d5a2e1c9e060ff0085f288afe4cb8567 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| /** | |
| * Hook: woocommerce_product_single_add_to_cart_text. | |
| * Modify the text displayed on the 'Add to cart' button. | |
| */ | |
| function plugin_republic_product_single_add_to_cart_text( $text, $product ) { | |
| // Modify the $text here | |
| return $text; | |
| } | |
| add_filter( 'woocommerce_product_single_add_to_cart_text', 'plugin_republic_product_single_add_to_cart_text', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment