SHARE
TWEET

Untitled

a guest Jun 16th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function __construct(
  2.     MagentoSalesApiOrderRepositoryInterface $orderRepository,
  3.     MagentoSalesModelResourceModelOrder $orderResourceModel
  4. ) {
  5.     $this->orderResourceModel = $orderResourceModel;
  6.     $this->orderRepository = $orderRepository;
  7. }
  8.  
  9. public function update()
  10. {
  11.     $order = $this->orderRepository->get(1); // 1 is  order id
  12.     $order->setCreatedAt($createdAt); // set time
  13.     $this->orderRepository->save($order);  
  14.  
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top