LLMS_Notification_Controller_Purchase_Receipt::send_test( string $type, array $data = array() )

Send a test notification to the currently logged in users


Description Description

Extending classes should redefine this in order to properly setup the controller with post_id and user_id data.


Top ↑

Parameters Parameters

$type

(string) (Required) Notification type [basic|email].

$data

(array) (Optional) Array of test notification data as specified by $this->get_test_data().

Default value: array()


Top ↑

Return Return

(int|false)


Top ↑

Source Source

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

	public function send_test( $type, $data = array() ) {

		if ( empty( $data['transaction_id'] ) ) {
			return;
		}

		$transaction   = llms_get_post( $data['transaction_id'] );
		$order         = $transaction->get_order();
		$this->user_id = $order->get( 'user_id' );
		$this->post_id = $transaction->get( 'id' );

		return parent::send_test( $type );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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