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

get_cart_total and subscriptions #6041

Closed
jameskoster opened this issue Aug 16, 2014 · 3 comments
Closed

get_cart_total and subscriptions #6041

jameskoster opened this issue Aug 16, 2014 · 3 comments

Comments

@jameskoster
Copy link
Member

If you have a subscription and other products in the cart, get_cart_total() only returns the subscription price while get_cart_subtotal() returns the expected '$100 now then $5 / month'.

get_cart_contents_count() behaves similarly (always returns 1 when a subscription is in the cart, regardless of how many items there actually are).

Wasn't sure if the issue was in subscriptions or core so go ahead and move if so.

@mikejolley
Copy link
Member

@thenbrent does Subscriptions filter on these methods?

@thenbrent
Copy link
Contributor

Subscriptions doesn't use the 'woocommerce_cart_contents_total' filter to customise the display of get_cart_total(). I think that's just an oversight on my part and probably just because get_cart_total() isn't used in WooCommerce core anywhere. A silly omission on my part as I added the filter! SHA: a08ed36

I've hooked to it with woothemes/woocommerce-subscriptions@44e7583 to display the full formatted cart total. That will go public with 1.5.10 in a couple of weeks.

get_cart_contents_count() behaves similarly (always returns 1 when a subscription is in the cart

That's a bug in Subscriptions. I've fixed it up with woothemes/woocommerce-subscriptions@4945e3ed6e979c.

This issue can be closed. No bugs in WC core. :)

@mikejolley
Copy link
Member

Thanks :)

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

No branches or pull requests

3 participants