Created
February 8, 2023 19:35
-
-
Save ajgagnon/6f8eb7f7c844c55f5860a7370eb60cde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action("surecart/order_created", function( $order ) { | |
$checkout = \SureCart\Models\Checkout::with([ | |
'line_items', | |
'line_item.price', | |
'line_item.fees', | |
'price.product', | |
'discount', | |
'discount.promotion', | |
'shipping_address', | |
])->find( $order->checkout ); | |
// do something with the checkout. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment