• Resolved Oleksandr

    (@track77)


    Hi
    next error appears after updating to the last version

    WordPress database error Unknown column 'mail_type' in 'field list' for query 
    							SELECT  	order_id,
    										order_date,
    										request_items,
    										mail_type
    							FROM    	wp_ywrr_email_schedule
    							WHERE		mail_status = 'pending' AND scheduled_date <= '2019-12-22 03:00:31'
    							ORDER BY    id DESC
    							LIMIT		10
    							 made by do_action_ref_array('ywrr_hourly_send_mail_job'), WP_Hook->do_action, WP_Hook->apply_filters, ywrr_hourly_schedule
Viewing 1 replies (of 1 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    This column was added to the table on this latest version (1.6.0). For some reason, it was not added to your installation.

    You have 2 ways to approach this problem:
    1. Add manually this column (‘mail_type’) to that table (ywrr_email_schedule). This field should be of type VARCHAR(100).

    2. Add this code snippet to the functions.php of your child theme:

    if ( ! function_exists( 'ywrr_update_1_6_0_fix' ) ) {
        
        function ywrr_update_1_6_0_fix() {
            
            global $wpdb;
    
            $sql = "ALTER TABLE {$wpdb->prefix}ywrr_email_schedule ADD mail_type varchar(100) NOT NULL DEFAULT 'order'";
            $wpdb->query( $sql );
    
            update_option( 'ywrr_db_version_ext', YWRR_DB_VERSION_EXT );
    
        }
    
        add_action( 'admin_init', 'ywrr_update_1_6_0_fix' );
    
    }

    After the column is added to the table, remove the code snippet.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress database error Unknown column ‘mail_type’’ is closed to new replies.