wp_insert_post Only creates draft

The reason why your code created drafts only is status=”pending” make it publish

Like
// Prepare to save!

   do_action( 'wpo_frontend_before_save_order', $order_details, $user_details );
     $post = array(
         'post_title'        =>  $order_details['title'],
         'post_author'       =>  get_current_user_id(),
         'post_type'         =>  'wp_order',
         'post_status'       =>  'publish'
     );
     $postID = wp_insert_post( $post );
     if ( is_wp_error( $postID ) ) {
         set_transient( 'wpo_new_order_message_' . get_current_user_id(), __( 'There was a problem to register your order. Please try again later', 'wpo' ) );
         return;
    }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)