woocommerce/plugins/woocommerce-blocks/docs/third-party-developers/extensibility/data-store/checkout.md

2.5 KiB

wc/store/checkout

Table of Contents

Selectors

getCustomerId

Returns the WordPress user ID of the customer whose order is currently processed by the Checkout block.

Returns

  • number: WordPress user ID of the customer.

getOrderNotes

Returns the order notes.

Returns

  • string: Order notes.

hasError

Returns true if an error occurred, and false otherwise.

Returns

  • boolean: Whether an error occurred.

hasOrder

Returns true if a draft order had been created, and false otherwise.

Returns

  • boolean: Whether a draft order had been created.

isAfterProcessing

Returns true if an order had just been processed, and false otherwise.

Returns

  • boolean: Whether an order had just been processed.

isBeforeProcessing

Returns true if an order is about to be processed, and false otherwise.

Returns

  • boolean: Whether an order is about to be processed.

isCalculating

Returns true if there is an in-flight request to update any values, and false otherwise.

Returns

  • boolean: Whether there is an in-flight request to update any values.

isComplete

Returns true if the order is complete, and false otherwise.

Returns

  • boolean: Whether the order is complete.

isIdle

Returns true if the checkout has had some activity, but is currently waiting for user input, and false otherwise.

Returns

  • boolean: Whether the checkout has had some activity, but is currently waiting for user input.

isProcessing

Returns true if the checkout is processing, and false otherwise.

Returns

  • boolean: Whether the checkout is processing.

We're hiring! Come work with us!

🐞 Found a mistake, or have a suggestion? Leave feedback about this document here.