How can we help?

checkout_confirm

payments_checkout_confirm(
    array $args,
)

This action is called once a user completes the checkout process. All information is passed as an array of arguments. The array includes (at least):

  • cart: The cart serialized as an array (see below)
  • customer_id: The Stripe customer_id – a string beginning with cust_.
  • user_id: The WordPress user_id associated with this customer.

The cart member is an array of information about the item including (at least):

  • items: The cart items
  • metadata: An associated metadata from the cart, e.g. payment id, subscription id, etc.

The items member is an array of item arrays containing:

  • price: The Stripe Price object, as an array.
  • product: The Stripe Product object, as an array.
  • quantity: The item quantity.
  • metadata: The metadata of the item itself, e.g. payment item id, subscription item id, etc.

After the Stripe payment, the user is redirected back to the WordPress site to finalized the checkout process. This action is the last step in the confirmation before the user state is reset.