WP Mail SMTP: specify an exact AuthType to connect to a Server.
add_filter( ‘wp_mail_smtp_custom_options’, function( $phpmailer ) { $phpmailer->AuthType = ‘LOGIN’; return $phpmailer; } );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘wp_mail_smtp_custom_options’, function( $phpmailer ) { $phpmailer->AuthType = ‘LOGIN’; return $phpmailer; } );Continue reading
function wpf_dev_register_smarttag( $tags ) { // Key is the tag, value is the tag name. $tags[‘submitted_cpt_id’] = ‘Submitted Post Type ID’; $tags[‘submitted_cpt_url’] = ‘Submitted Post Type URL’; $tags[‘submitted_cpt_title’] = ‘Submitted Post Type Title’; return $tags; } add_filter( ‘wpforms_smart_tags’, ‘wpf_dev_register_smarttag’ );…Continue reading
// HTML Email. add_filter( ‘wpforms_html_field_value’, static function ( $field_val, $field, $form_data, $context ) { if ( $context !== ’email-html’ ) { return $field_val; } if ( empty( $form_data[‘fields’][ $field[‘id’] ] ) ) { return $field_val; } $field_data = $form_data[‘fields’][ $field[‘id’]…Continue reading
// Register the smart tag. add_filter( ‘wpforms_smart_tags’, static function( $tags ) { // Key is the tag, value is the tag name. $tags[‘current_unix_time’] = ‘Current Unix Time’; return $tags; } ); // Replace its value on form render on front-end.…Continue reading
// Register the smart tag. add_filter( ‘wpforms_smart_tags’, static function( $tags ) { // Key is the tag, value is the tag name. $tags[‘current_time’] = ‘Current Date/Time’; return $tags; } ); // Replace its value on form render on front-end. add_filter(…Continue reading
// Main content area. add_action( ‘wpforms_entry_details_content’, static function ( $entry, $form_data, $single_entry ) { $hook_name = ‘wpforms_entry_details_content’; remove_action( $hook_name, [ $single_entry, ‘details_fields’ ], 10 ); remove_action( $hook_name, [ $single_entry, ‘details_notes’ ], 10 ); remove_action( $hook_name, [ $single_entry, ‘details_log’ ], 40…Continue reading
add_action( ‘wpforms_frontend_output_success’, static function ( $form_data, $fields, $entry_id ) { unset( $_GET[‘wpforms_return’], $_POST[‘wpforms’][‘id’] ); // If you want to preserve the user entered values in form fields – remove the line below. unset( $_POST[‘wpforms’][‘fields’] ); // Actually render the form.…Continue reading
function pw_edd_custom_countries( $countries = array() ) { $countries = array( ‘US’ => ‘United States’, ‘CA’ => ‘Canada’ ); return $countries; } add_filter( ‘edd_countries’, ‘pw_edd_custom_countries’ );Continue reading
add_filter( ‘ulgm_group_course_report_columns’, function ( $columns ) { //Add new column(s) $columns[‘custom_key’] = ‘My custom column’; return $columns; }, 99, 1 );Continue reading
add_filter( ‘ulgm_group_course_report_user_data’, function ( $user_data, $user_id, $group_id, $course_id ) { $date_format = get_option( ‘date_format’ ); $login_timestamp = get_user_meta( $user_id, ‘learndash-last-login’, true ); // Add additional keys and add data like $user_data[‘learndash-last-login’] = wp_date( $date_format, $login_timestamp ); return $user_data; }, 99,…Continue reading