Compare commits
	
		
			No commits in common. "6cab863d14c1fa2ce8583cf1093fc36353b017b9" and "24a6df5a3b30992383a75f1cb73f56f1d0f6092c" have entirely different histories.
		
	
	
		
			6cab863d14
			...
			24a6df5a3b
		
	
		|  | @ -30,6 +30,7 @@ class CheckOrderStatus implements ObserverInterface | |||
|         $currentContent .= date("Y-m-d H:i:s") . ':'; | ||||
|         $currentContent .= $content; | ||||
|         $currentContent .= "\n"; | ||||
|         $currentContent = str_replace(array("\r", "\n"), '', 500); | ||||
|         file_put_contents($file, $currentContent); | ||||
|     } | ||||
| 
 | ||||
|  | @ -37,12 +38,9 @@ class CheckOrderStatus implements ObserverInterface | |||
|     { | ||||
|         $order = $observer->getEvent()->getOrder(); | ||||
| 
 | ||||
|         $listStateToSync = ['complete', 'processing', 'canceled']; | ||||
|         if ($order instanceof \Magento\Sales\Model\Order && in_array($order->getStatus(), $listStateToSync)) { | ||||
|             $sync = new \IpSupply\SyncOrder\Sync\Index; | ||||
|             $content = $sync->syncOrder($order); | ||||
|             $this->_saveLog($content); | ||||
|         } | ||||
|         $sync = new \IpSupply\SyncOrder\Sync\Index; | ||||
|         $content = $sync->syncOrder($order); | ||||
|         $this->_saveLog($content); | ||||
| 
 | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue