Created
August 18, 2025 02:09
-
-
Save shameemreza/91277ae56b6546fceb5dba908f44a2da to your computer and use it in GitHub Desktop.
Forces WooCommerce Bookings products to always show "Add to Cart" as the button text.
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
| add_filter('woocommerce_product_add_to_cart_text', function($text, $product) { | |
| if ($product->get_type() === 'booking') { | |
| return __('Add to Cart', 'woocommerce'); | |
| } | |
| return $text; | |
| }, 10, 2); |
Author
shameemreza
commented
Aug 18, 2025

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