Enable Legacy Email Templates

/** * Revert to legacy ‘HTML’ email template, v1.8.4 and below * * @link https://wpforms.com/developers/how-to-enable-legacy-email-template/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ $settings = (array) get_option( ‘wpforms_settings’, [] ); $settings[ ’email-template’ ] = ‘default’; update_option( ‘wpforms_settings’, $settings );Continue reading

WP Simple Pay: Facebook Payment Conversion Tracking

/** * @link https://library.wpcode.com/snippet/j57gg315/ */ add_action( ‘simpay_payment_receipt_viewed’, /** * Runs the first time the payment confirmation page is viewed. * * @param array $payment_confirmation_data */ function( $payment_confirmation_data ) { // Payment customer data (not used in this example). $customer =…Continue reading

WP Simple Pay: Add User Meta After Payment

/** * @link https://library.wpcode.com/snippet/qo9xxmjo/ * * @param \Stripe\Event $event Stripe Event. * @param \Stripe\Subscription|\Stripe\PaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_update_wp_user( $event, $object ) { $email_address = $object->customer->email; $wp_user = get_user_by( ’email’, $email_address ); // User cannot be found,…Continue reading