llms_track_failed_checkouts_for_spam()

Track spam activity when checkouts or billing updates fail.


Description Description

Hooked on wp so the $post global is set up.


Top ↑

Parameters Parameters

$morder

(MemberOrder) (Required) The order object used at checkout. We ignore it.


Top ↑

Source Source

File: includes/llms.spam.functions.php

function llms_track_failed_checkouts_for_spam() {
	// Bail if Spam Protection is disabled.
	if ( ! llms_is_spam_protection_enabled() ) {
		return;
	}

	// Bail if we're not on the LifterLMS checkout page.
	if ( is_admin() || ! is_llms_checkout() ) {
		return;
	}

	// Bail if there are no notices with type error.
	$notices = llms()->session->get( 'llms_notices', array() );
	$types   = array_keys( $notices );
	if ( ! in_array( 'error', $types ) ) {
		return;
	}

	llms_track_spam_activity();
}


Top ↑

Changelog Changelog

Changelog
Version Description
9.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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