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/ * * @param \Stripe\Event $event Stripe Event. * @param \Stripe\Subscription|\Stripe\PaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_custom_create_user( $event, $object ) { $email_address = $object->customer->email; // Don’t create duplicate records. if ( false !== username_exists( $email_address…Continue reading

WP Simple Pay: Create WordPress User After Payment (Lite)

/** * @link https://library.wpcode.com/snippet/32j68l5l/ */ add_action( ‘simpay_payment_receipt_viewed’, /** * @param array $payment_confirmation_data { * Contextual information about this payment confirmation. * * @type \SimplePay\Vendor\Stripe\Customer $customer Stripe Customer * @type \SimplePay\Core\Abstracts\Form $form Payment form. * @type array $subscriptions Subscriptions associated with…Continue reading