I'm sending some data via cURL to PS SitemapController i overwrote :
With that data i proceed in a custom function like that :
$product = new Product($_POST['id']);
$product->price = $_POST['price'];
$product->wholesale_price = $_POST['wholesale_price'];
$product->unity = $_POST['unity'];
$product->save();
Then my problem happens : sometimes it will save my changes to the product, sometimes not.
To be sure i was always sending the data to the controller, i'm creating a log.txt file right before the $product->save() line, with data written in there. I checked, and my wordpress plugin is systematically sending the data to the controller and the function. The problem really seems to appear on save() function because a fputs right after product->save() won't do anything (when it is not saved btw).
Hopefully someone will know more about this and be a light on my path!