From aafcd004aa77ef680f4373a501df829c5b35af10 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 19 Jan 2024 18:58:15 +0530 Subject: [PATCH] Improve openAI image generate process Codeinwp/feedzy-rss-feeds-pro#637 --- includes/admin/feedzy-rss-feeds-actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/feedzy-rss-feeds-actions.php b/includes/admin/feedzy-rss-feeds-actions.php index a3913139..8b8829f3 100644 --- a/includes/admin/feedzy-rss-feeds-actions.php +++ b/includes/admin/feedzy-rss-feeds-actions.php @@ -400,7 +400,7 @@ private function word_ai_content() { */ private function default_content() { if ( ! method_exists( $this, $this->current_job->tag ) ) { - return ''; + return $this->default_value; } return call_user_func( array( $this, $this->current_job->tag ) ); } @@ -448,7 +448,7 @@ private function generate_image() { if ( ! class_exists( '\Feedzy_Rss_Feeds_Pro_Openai' ) ) { return isset( $this->default_value ) ? $this->default_value : ''; } - if ( ! $this->current_job->data->generateImgWithChatGPT ) { + if ( $this->current_job->data->generateImgWithChatGPT && empty( $this->default_value ) ) { return isset( $this->default_value ) ? $this->default_value : ''; } $openai = new \Feedzy_Rss_Feeds_Pro_Openai();