Skip to content

Instantly share code, notes, and snippets.

@shameemreza
Created August 18, 2025 02:09
Show Gist options
  • Select an option

  • Save shameemreza/91277ae56b6546fceb5dba908f44a2da to your computer and use it in GitHub Desktop.

Select an option

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.
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);
@shameemreza
Copy link
Author

CleanShot 2025-08-18 at 08 20 05

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