| Server IP : 198.244.165.102 / Your IP : 216.73.216.218 [ Web Server : nginx/1.24.0 System : Linux modovh-ub-01 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : colleary ( 1011) PHP Version : 8.3.23 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/egv/public_html/aim_sync/ |
Upload File : |
<?php
$target_picture_wp = "https://www.egv.ie/wp-content/uploads/products/10040.jpg";
$disc_price = 0;
if (($target_picture_wp != "")) {
$data['images'][]['src'] = $target_picture_wp;
}
$data = [
'name' => 'Test Product',
'type' => 'simple',
'regular_price' => 33.3,
'description' => 'Test Desc',
'sku' => $product_id,
'stock_quantity' => 45,
'manage_stock' => 'true',
'global_unique_id' => '883737773773',
'categories' => [
[
'id' => 'Cat A'
],
[
'id' => "Cat B"
]
]
];
// if ($disc_price > 0) {
// $data['sale_price'] = $disc_price;
// $data['on_sale'] = 'true';
// }
// // if (($target_picture != "") && $update_picture) {
if (($target_picture_wp != "")) {
$data['images'][]['src'] = $target_picture_wp;
}
echo var_dump($data);
?>