# routeapp/2.4.19/includes/class-routeapp-blocks-integration.php

Route ‑ Shipping Protection, version 2.4.19. 62 lines.

- Page: https://pluginprobe.com/plugins/routeapp/2.4.19/code/includes/class-routeapp-blocks-integration.php
- Raw: https://pluginprobe.com/plugins/routeapp/2.4.19/raw/includes/class-routeapp-blocks-integration.php
- Modified: 2026-06-11T21:06:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/routeapp/2.4.19/code/includes/class-routeapp-blocks-integration.php#L10-L20`.

```php
<?php

if ( ! interface_exists( 'Automattic\WooCommerce\Blocks\Integrations\IntegrationInterface' ) ) {
	return;
}

use Automattic\WooCommerce\Blocks\Integrations\IntegrationInterface;

/**
 * Route Protection block integration with WooCommerce Blocks checkout.
 *
 * Enqueues the script that registers the additionalCartCheckoutInnerBlockTypes
 * filter so the Route block is allowed inside checkout inner-block areas.
 */
class Routeapp_Blocks_Integration implements IntegrationInterface {

	/**
	 * @return string
	 */
	public function get_name() {
		return 'route-protection';
	}

	/**
	 * Register frontend script that whitelists the block in checkout areas.
	 */
	public function initialize() {
		$deps = wp_script_is( 'wc-blocks-checkout', 'registered' )
			? array( 'wc-blocks-checkout' )
			: array();

		wp_register_script(
			'route-protection-block-frontend',
			plugins_url( 'blocks/route-protection/frontend.js', dirname( __FILE__ ) ),
			$deps,
			defined( 'ROUTEAPP_VERSION' ) ? ROUTEAPP_VERSION : '1.0.0',
			true
		);
	}

	/**
	 * @return string[]
	 */
	public function get_script_handles() {
		return array( 'route-protection-block-frontend' );
	}

	/**
	 * @return string[]
	 */
	public function get_editor_script_handles() {
		return array( 'route-protection-block-frontend' );
	}

	/**
	 * @return array
	 */
	public function get_script_data() {
		return array();
	}
}

```
