Ajax::validateRequest()

Validate the ajax request

Description

Source

File: bp-integrations/learndash/buddypress/Ajax.php

	protected function validateRequest()
	{
        if (! wp_verify_nonce(bp_ld_sync()->getRequest('nonce'), 'bp_ld_report')) {
            wp_send_json_error([
                'message' => __('Session has expired, please refresh and try again.', 'buddyboss')
            ]);
        }

        if ( $this->setRequestGroups() && ( ! $this->bp_group || ! $this->ld_group ) ) {
            wp_send_json_error([
                'message' => __('Unable to find selected group.', 'buddyboss')
            ]);
        }
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.