How to Add BCC to Email Notifications (for specific form)

/** * Add BCC recipients to specific form email notifications. * * @link https://wpforms.com/docs/how-to-add-bcc-to-email-notifications/ */ add_filter( ‘wp_mail’, function ( $args ) { // Use WPForms_Process object to get the form ID $wpforms_process = wpforms()->process; // Only run this snippet on…Continue reading

How to Automatically Submit a Form with a Field Choice – CSS

button#wpforms-submit-3046 { display: none; } form#wpforms-form-3046 span.wpforms-icon-choices-label { font-size: 0; } ul#wpforms-3046-field_3 li label:hover, ul#wpforms-3046-field_4 li label:hover, ul#wpforms-3046-field_3 li.wpforms-selected label, ul#wpforms-3046-field_4 li.wpforms-selected label { box-shadow: none; } form#wpforms-form-3046 ul.wpforms-icon-choices .wpforms-icon-choices-item label{ margin:0 auto; padding:0; } div#wpforms-3046-field_4-container { width: 20%; float:…Continue reading

How to Defer the reCAPTCHA Script

/** * Defer the reCAPTCHA script until after the page loads * * @link https://wpforms.com/developers/how-to-defer-the-recaptcha-script/ */ function wpf_recaptcha_add_async_defer( $tag, $handle ) { if ( strpos( $tag, ‘recaptcha/api.js?onload=wpformsRecaptchaLoad’ ) !== false ) { $tag = str_replace( ‘ src’, ‘ defer async=”async”…Continue reading

Changing the Cache Time on Your Form Token

/** * Extend cache time on form tokens before today. * * @link https://wpforms.com/developers/how-to-change-the-cache-time-on-your-form-token */ function example_add_longer_token_time_before( $times ) { // Allow the token to persist for 3, 4, and 5 days $times[] = 3 * DAY_IN_SECONDS; $times[] = 4…Continue reading

Update Donation Summary

add_filter(‘charitable_donation_summary’, ‘charitable_custom_donation_summary’, 10, 4 ); /** * Custom donation summary output. * * @param string $ret The default donation summary output. * @param Charitable_Campaign $campaign The campaign object. * @param int $amount The amount raised. * @param int $goal The…Continue reading