Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
remove unnecessary calls to post/product images.
Browse files Browse the repository at this point in the history
  • Loading branch information
nefeline committed Oct 11, 2023
1 parent 057fe93 commit 35b0719
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/Patterns/ProductUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ public function update_product_content( $product, $ai_generated_product_content
require_once ABSPATH . 'wp-admin/includes/file.php';
require_once ABSPATH . 'wp-admin/includes/image.php';

$product->get_image_id();
the_post_thumbnail_url();

$product_image_id = media_sideload_image( $ai_generated_product_content['image']['src'], $product->get_id(), $ai_generated_product_content['image']['alt'], 'id' );

if ( is_wp_error( $product_image_id ) ) {
Expand Down

0 comments on commit 35b0719

Please sign in to comment.