• Resolved Sayan Datta

    (@infosatech)


    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 Sayan Datta.
    • This topic was modified 9 months, 4 weeks ago by Sayan Datta.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Ivan C.

    (@ivanbsf)

    Hello @infosatech!

    Thank you for choosing SureCart and reaching out to us. Sorry for any delay.

    Could you please open a support ticket? We will then forward it directly to the SureCart developers so that they can look into the issue!

    Best,

Viewing 1 replies (of 1 total)
  • The topic ‘Purchase meta data api’ is closed to new replies.