-
Notifications
You must be signed in to change notification settings - Fork 25
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 totals on JS #28
Comments
@senadir could you maybe help here? Thanks! |
Hi, The How you access cart totals depends on your use case. They are available from the REST API, or some components are passed these values for context. For example, payment methods will be given the cart totals and customer address information. I'd suggest starting here: And for payment method specifically look here: An example of cart data, if you look at the I will mark this closed as this is unrelated to this repository. You can ask questions on WooCommerce Community Slack if you need further assistance. Thanks |
Hello. I've understood that canMakePayment function can hold CartTotals variable, but what if i want to design an selectbox depending on the cart total on Content of the const Dummy, before sending it to registerPaymentMethod |
@seldimi there are examples in the resources I listed and in this repository
|
Hello
import { useCart } from '@woocommerce/blocks-checkout';
Can you give an example or least document how to get the cart (eg cart totals, as the above one fails
The text was updated successfully, but these errors were encountered: