Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change variation's single_add_to_cart_text() #743

Merged

Conversation

helgatheviking
Copy link
Contributor

@helgatheviking helgatheviking commented Dec 10, 2024

to use WC_Subscriptions_Product::get_add_to_cart_text() as default value. This avoids the woocommerce_product_add_to_cart_text filter. Closes #741.

…Product::get_add_to_cart_text() as default value. This avoids the `woocommerce_product_add_to_cart_text` filter. Closes Automattic#741.
Copy link
Contributor

@mattallan mattallan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @helgatheviking for fixing this for us!

I couldn't figure out why our variation product class was using self::add_to_cart_text() but our variable and single products were using WC_Subscriptions_Product::get_add_to_cart_text() 🤔

This code hasn't been touched in 9years so I suspect it was an oversight from when it was originally developed.

trunk this branch
image image

@helgatheviking
Copy link
Contributor Author

Happy to... I caught it while I was fixing an issue in my own dusty code. 😄

@mattallan mattallan merged commit 3ec42fe into Automattic:trunk Dec 16, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WC_Product_Subscription_Variation::single_add_to_cart_text() should not default to add_to_cart_text()
2 participants