Patch Custom note change (PayPal API)
-
Hi I need this code modified from this:
/** * @return Patch * @throws InvalidArgumentException */ public function custom() { $custom_patch = new Patch(); $custom_patch ->setOp('add') ->setPath('/transactions/0/custom') ->setValue($this->order->get_order_key()); return $custom_patch; }
to this:
/** * @return Patch * @throws InvalidArgumentException */ public function custom() { $custom_patch = new Patch(); $custom_patch ->setOp('add') ->setPath('/transactions/0/custom') ->setValue(wp_json_encode([ 'order_id' => $this->order->get_id(), 'order_key' => $this->order->get_order_key(), ])); return $custom_patch; }
Is there an easy way to do? Maybe you have some hooks that I could attach to?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Patch Custom note change (PayPal API)’ is closed to new replies.