Remove Multiple Fields From {all_fields} in Notifications

/** * Remove Specific Fields from Notifications * * @link https://wpforms.com/developers/how-to-remove-specific-fields-from-notifications */ add_action(‘wpforms_loaded’, function() { add_filter(‘wpforms_entry_email_data’, function ($fields, $entry, $form_data) { // Bail early if form ID is not equal to 1000 if ((int)$form_data[‘id’] !== 1000) { return $fields; }…Continue reading

To Remove a Single Field From {all_fields}

/** * Remove Specific Fields from Notifications * * @link https://wpforms.com/developers/how-to-remove-specific-fields-from-notifications */ add_action(‘wpforms_loaded’, function() { add_filter(‘wpforms_entry_email_data’, function ($fields, $entry, $form_data) { // Bail early if form ID is not equal to 1000 if ((int)$form_data[‘id’] !== 1000) { return $fields; }…Continue reading

Increasing Image Size in Notification Emails

/** * How to Increase Image Size in Notification Emails * * @link https://wpforms.com/developers/how-to-increase-image-size-in-notification-emails */ function wpf_custom_wpforms_email_notification_message_thumbnail($message) { // Define the new width and height $new_width = ‘auto’; $new_height = 200; // Use preg_replace to modify the width and height…Continue reading

Donation Form Email Check

add_filter(‘charitable_validate_donation_form_submission_email_check’, ‘charitable_test_for_email’, 10, 2 ); function charitable_test_for_email( $valid, $submitted ) { $email = $submitted->get_submitted_value( ’email’ ); // Add your logic here to see if the email is valid or not. // Return false if not valid, otherwise let the validation…Continue reading

Boton OneSignal = ok

// Agregar un shortcode para el botón function onesignal_register_button() { if (is_user_logged_in()) { $current_user = wp_get_current_user(); $email = $current_user->user_email; // Botón que llama a la función de registro en OneSignal mediante AJAX return ‘ Recibir notificaciones ‘; } else {…Continue reading

Add Featured Image Column

add_filter( ‘manage_posts_columns’, function ( $columns ) { // You can change this to any other position by changing ‘title’ to the name of the column you want to put it after. $move_after = ‘title’; $move_after_key = array_search( $move_after, array_keys( $columns…Continue reading

Add the Buy on Kindle button near Add to Cart in WooCommerce PDP.

/** * Snippet Name: Add the Buy on Kindle button near Add to Cart in WooCommerce PDP. */ add_action(‘woocommerce_after_add_to_cart_button’,’add_kindle_button’); function add_kindle_button() { $kindle_button_url = get_post_meta( get_the_ID(),’kindle_button_url’,true); if ( isset($kindle_button_url) && filter_var($kindle_button_url, FILTER_VALIDATE_URL)) { $style = ‘style=”background-color: #ff9900; color: #fff;’; $button…Continue reading