Open srazi opened 5 years ago
May this helps you: As debug purpose I added the following line of code:
$import['post_title'].=($index. '- '.$img_item->images->standard_resolution->url);
to:
protected function save_img_post() {
...
switch ( $this->pic->type ) {
...
case 'carousel':
...
foreach ( $p->carousel_media as $img_item ) {
...
switch ( $img_item->type ) {
...
default:
...
$sub_items[] = $this->upload_img_media( $img_item, wp_trim_words( $import['post_title'], 5, '...' ) . ' - ' . ++$index );
// added by me
$import['post_title'].=($index. '- '.$img_item->images->standard_resolution->url);
break;
}
}
}
And the title correctly contains URLs of all photos.
I have an strange problem. With two account (personal) it correctly imports all photo of a post. But with my another account (business) it imports just import first photo multiple times.
Maybe the type of account is the problem here?