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.

Top ↑

Parameters Parameters


(int) (Required) WP_Post ID.

Top ↑

Return Return


Top ↑

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' ) );


Top ↑

Changelog Changelog

Version Description
3.33.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.