Create a filter for my WP All Import image data
Budget: €18 – €36 EUR
We use WPAI to import WooCommerce products.
In this process we need to populate the WPAI WooCommerce "Image name" field. The problem is that the image file name does not appear in the import file and needs to be constructed.
Filename example: WR201565_5056_Camelia_300.jpg
From the import docs we can match the first data entry [WR201565] and the second [5056]. What we need is to be able to simply drop the rest and have WPAI match image from the first two data entries only.
I will consider answers from expert WooCommerce developers with good understanding of WPAI.
Resources:
https://www.wpallimport.com/documentation/developers/custom-code/inline-php/
function my_get_image_name($styleno, $farvekode, $stylename) {
$stylename = trim(strtok($stylename,' '));
return $styleno.'_'.$farvekode.'_'.$stylename.'_'.'300';
}
In this process we need to populate the WPAI WooCommerce "Image name" field. The problem is that the image file name does not appear in the import file and needs to be constructed.
Filename example: WR201565_5056_Camelia_300.jpg
From the import docs we can match the first data entry [WR201565] and the second [5056]. What we need is to be able to simply drop the rest and have WPAI match image from the first two data entries only.
I will consider answers from expert WooCommerce developers with good understanding of WPAI.
Resources:
https://www.wpallimport.com/documentation/developers/custom-code/inline-php/
function my_get_image_name($styleno, $farvekode, $stylename) {
$stylename = trim(strtok($stylename,' '));
return $styleno.'_'.$farvekode.'_'.$stylename.'_'.'300';
}