WP Simple Pay: Programmatically Access Payment Metadata After Payment

/** * @link https://library.wpcode.com/snippet/3234p8or/ * * @param StripeEvent $event Stripe Event. * @param StripeSubscription|StripePaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_custom_create_user( $event, $object ) { $metadata = $object->metadata->toArray(); // Access a custom field with a “Stripe Metadata Label” of…Continue reading

WP Simple Pay: Create WordPress User After Payment

/** * @link https://library.wpcode.com/snippet/3234p8or/ * * @link https://docs.stripe.com/api/subscriptions/object Subscription object * @link https://docs.stripe.com/api/payment_intents/object PaymentIntent object * @link https://docs.stripe.com/api/customers/object Customer object * * @param \Stripe\Event $event Stripe Event. * @param \Stripe\Subscription|\Stripe\PaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_custom_create_user( $event, $object…Continue reading