WordPress at Your Fingertips
function is not described

WC_Gateway_Paypal_IPN_Handler::validate_transaction_type() protected WC 1.0

Check for a valid transaction type.

{} It's a method of the class: WC_Gateway_Paypal_IPN_Handler{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->validate_transaction_type( $txn_type );
$txn_type(string) (required)
Transaction type.

Code of WC_Gateway_Paypal_IPN_Handler::validate_transaction_type() WC 5.6.0

protected function validate_transaction_type( $txn_type ) {
	$accepted_types = array( 'cart', 'instant', 'express_checkout', 'web_accept', 'masspay', 'send_money', 'paypal_here' );

	if ( ! in_array( strtolower( $txn_type ), $accepted_types, true ) ) {
		WC_Gateway_Paypal::log( 'Aborting, Invalid type:' . $txn_type );
		exit;
	}
}