18 lines
651 B
Markdown
18 lines
651 B
Markdown
```php
|
|
// The action callback function.
|
|
function my_function_callback( $order ) {
|
|
// Do something with the $order object.
|
|
$order->save();
|
|
}
|
|
|
|
add_action( 'woocommerce_blocks_checkout_order_processed', 'my_function_callback', 10 );
|
|
```
|
|
<!-- FEEDBACK -->
|
|
---
|
|
|
|
[We're hiring!](https://woocommerce.com/careers/) Come work with us!
|
|
|
|
🐞 Found a mistake, or have a suggestion? [Leave feedback about this document here.](https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?assignees=&labels=type%3A+documentation&template=--doc-feedback.md&title=Feedback%20on%20./docs/examples/checkout-order-processed.md)
|
|
<!-- /FEEDBACK -->
|
|
|