After updating to 1.7.6...
When changing ordre "current_state" using webservice, emails is not sent tho ordre state changes.
Hi @thbl,
Thanks for your report.
I manage to reproduce the issue with PS1.7.6.0.
I used this script
<?php
/**
* Created by PhpStorm.
* User: khouloud.belguith
* Date: 24/07/19
* Time: 12:01
*/
define('DEBUG', true);
ini_set('display_errors','on');
define('PS_SHOP_PATH', 'http://shop.com');
define('PS_WS_AUTH_KEY', 'key');
require_once('PSWebServiceLibrary.php');
$ws = new PrestaShopWebservice(
'http://shop.com',
'Key',
false);
$id = 11; //ID order Here
$xml = $ws->get(array('resource' => 'orders', 'id' => $id));
echo "BEFORE\n";
echo $xml->asXML();
unset($xml->order->current_state);
$xml->order->shipping_number = 10;
$xml->order->current_state = 4;
$opt['putXml'] = $xml->asXML();
$opt['id'] = $id;
$opt['resource'] = 'orders';
$xml = $ws->edit($opt);
$xml = $ws->get(array('resource' => 'orders', 'id' => $id));
echo $xml->asXML();
It is OK with PS1.7.5.2, Email is received.
I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
@khouloudbelguith sadly i can't seam to find the bug yet
If new state has "send email to customer" enable, webservice will return with a error 500
(500 Internal Server Error)
Tho the order state has been changed, without sending a email.
Reopened, the PR should be on 1.7.6.x branch
Most helpful comment
Hi @thbl,
Thanks for your report.
I manage to reproduce the issue with PS1.7.6.0.
I used this script
It is OK with PS1.7.5.2, Email is received.
I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!