incorrect reference/order number
-
Hi there,
I realized that the reference numbers for invitations do not match the actual order numbers. It’s always plus 1 for some strange reason.
Example: If customer order number is 2802, reference number in the trust pilot / invitation dashboard shows 2803.
I found following code in orders.php ? Is there a reason this is happening?
Thanks
T/**
* Updating post orders lists after automatic invitation
*/
private function handle_single_response($response, $order) {
try {
$synced_orders = trustpilot_get_field(TRUSTPILOT_PAST_ORDERS_FIELD);
$failed_orders = trustpilot_get_field(TRUSTPILOT_FAILED_ORDERS_FIELD);if ($response[‘code’] == 201) {
trustpilot_set_field(TRUSTPILOT_PAST_ORDERS_FIELD, $synced_orders + 1);
if (isset($failed_orders->{$order[‘referenceId’]})) {
unset($failed_orders->{$order[‘referenceId’]});
trustpilot_set_field(TRUSTPILOT_FAILED_ORDERS_FIELD, $failed_orders);
}
- The topic ‘incorrect reference/order number’ is closed to new replies.