WP Simple Pay: Copy Payment Metadata to Customer Metadata
/** * @link https://library.wpcode.com/snippet/e5wng05d/ * * @param StripeEvent $event Stripe Event. * @param StripeSubscription|StripePaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_add_metadata_to_customer( $event, $object ) { $customer_id = $object->customer->id; $customer = SimplePayCorePaymentsStripe_API::request( ‘Customer’, ‘update’, $customer_id, array( ‘metadata’ => $object->metadata->toArray(), )…Continue reading