🚀 Mindspun Payments Launch Offer

How can we help?


    Order $order

This action is called once a user completes the checkout process. All information is passed as part of the $order.

All instance properties are read-only.

The Order instance has the following properties:

  • id: The ID of the order (same as the payment intent).
  • email: The customer email.
  • 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 is a ShoppingCart instance with the following (at least):

  • get_items(): Getter for the cart items
  • metadata: An associative array of metadata for the cart, e.g. payment ID, subscription ID, etc.

The get_items() returns an array of CartItem instances with the following properties:

  • price: The Stripe Price object.
  • product: The Stripe Product object.
  • 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 to the WordPress site to finalize the checkout process. This action is the last step in the confirmation before the user state is reset.