LLMS_Notification_Controller_Purchase_Receipt::action_callback( int $transaction = null )

Callback function called when a lesson is completed by a student


Parameters Parameters

$transaction

(int) (Optional) Instance of a LLMS_Transaction.

Default value: null


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/notifications/controllers/class.llms.notification.controller.purchase.receipt.php

	public function action_callback( $transaction = null ) {

		$order = $transaction->get_order();

		/**
		 * Filter to avoid sending notification for purchase receipts.
		 *
		 * @since 9.1.2
		 */
		if ( ! apply_filters( 'llms_send_purchase_receipt_notification', true, $order, $transaction ) ) {
			return;
		}

		$this->user_id = $order->get( 'user_id' );
		$this->post_id = $transaction->get( 'id' );

		$this->send();
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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