Webhook::receive()

Summary

Handles a webhook request.


Source

File: src/BigCommerce/Webhooks/Webhook.php

	public function receive() {
		$request = $this->get_webhook_payload();

		$validates = $this->validate( $request );

		if ( is_wp_error( $validates ) ) {
			wp_send_json_error( $validates, 400 );
		}

		$this->trigger_action( $request );

		wp_send_json_success();
	}


User Contributed Notes

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