LLMS_Controller_Orders::on_delete_order( int $post_id )
Called when a post is permanently deleted.
Description Description
Will delete any enrollment records linked to the LLMS_Order with the ID of the deleted post.
Parameters Parameters
- $post_id
-
(int) (Required) WP_Post ID.
Return Return
(void)
Source Source
File: includes/controllers/class.llms.controller.orders.php
public function on_delete_order( $post_id ) { $order = llms_get_post( $post_id ); if ( $order && is_a( $order, 'LLMS_Order' ) ) { llms_delete_student_enrollment( $order->get( 'user_id' ), $order->get( 'product_id' ), 'order_' . $order->get( 'id' ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.33.0 | Introduced. |