WC_Admin_Webhooks_Table_List::uses_legacy_rest_api()privateWC 1.0

Check if a given webhook is configured to use the legacy payload format.

Method of the class: WC_Admin_Webhooks_Table_List{}

No Hooks.

Return

true|false. True if the webhook is configured to use the legacy payload format.

Usage

// private - for code of main (parent) class only
$result = $this->uses_legacy_rest_api( $webhook );
$webhook(WC_Webhook) (required)
Webhook object.

WC_Admin_Webhooks_Table_List::uses_legacy_rest_api() code WC 9.4.2

private function uses_legacy_rest_api( $webhook ) {
	return 0 === strpos( $webhook->get_api_version(), 'legacy' );
}