|
@@ 264-268 (lines=5) @@
|
| 261 |
|
'href' => rest_url( sprintf( '/%s/%s', $this->namespace, $this->rest_base ) ), |
| 262 |
|
), |
| 263 |
|
); |
| 264 |
|
if ( 0 !== (int) $order->get_user_id() ) { |
| 265 |
|
$links['customer'] = array( |
| 266 |
|
'href' => rest_url( sprintf( '/%s/customers/%d', $this->namespace, $order->get_user_id() ) ), |
| 267 |
|
); |
| 268 |
|
} |
| 269 |
|
if ( 0 !== (int) $order->get_parent_id() ) { |
| 270 |
|
$links['up'] = array( |
| 271 |
|
'href' => rest_url( sprintf( '/%s/orders/%d', $this->namespace, $order->get_parent_id() ) ), |
|
@@ 269-273 (lines=5) @@
|
| 266 |
|
'href' => rest_url( sprintf( '/%s/customers/%d', $this->namespace, $order->get_user_id() ) ), |
| 267 |
|
); |
| 268 |
|
} |
| 269 |
|
if ( 0 !== (int) $order->get_parent_id() ) { |
| 270 |
|
$links['up'] = array( |
| 271 |
|
'href' => rest_url( sprintf( '/%s/orders/%d', $this->namespace, $order->get_parent_id() ) ), |
| 272 |
|
); |
| 273 |
|
} |
| 274 |
|
return $links; |
| 275 |
|
} |
| 276 |
|
|