Purchase meta data api
-
Hi,
I am creating an integration with SureCart plugin, but within onPurchaseCreated method, I need to store some data as purchase meta.
$purchase = Purchase::with( [ 'order', 'invoice' ] )->find( $this->getPurchaseId() );
I managed to get $purchase, but also I need some method to add, update, delete and get meta data like:
$purchase->add_meta( 'xyz_links', $links ); $purchase->get_meta( 'xyz_links', true );
Basically I need some methods for $purchase like WooCommerce has for Order:
$order->update_meta_data( 'xyz_links', $links ); $order->save();
Nothing mentioned in documentation: https://developer.surecart.com/docs/extending-the-integration-class
Thanks in advance.
- This topic was modified 9 months, 4 weeks ago by .
- This topic was modified 9 months, 4 weeks ago by .
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Purchase meta data api’ is closed to new replies.