Skip to content

Instantly share code, notes, and snippets.

@MonteLogic
Last active November 17, 2022 02:05
Show Gist options
  • Save MonteLogic/a03d459954f5c67269368eb23e6b1e2b to your computer and use it in GitHub Desktop.
Save MonteLogic/a03d459954f5c67269368eb23e6b1e2b to your computer and use it in GitHub Desktop.
<?php
/**
* What I am trying to do is access the IntegrationInterface from
* WooCommerce-Blocks
* Documentation on IntegrationInterface:
* https://github.com/woocommerce/woocommerce-blocks/blob/50f9b3e8d012f425d318908cc13d9c601d97bd68/docs/extensibility/integration-interface.md
*
*
* It is an interface which allows for certain files to be loaded in a
* certain order to allow for addition into the WC Blocks web page.
*
* My problem is I have the following and I STILL cannot access it.
* I am getting the error:
*
*
* Uncaught Error: Class 'Automattic\WooCommerce\Blocks\Integrations\IntegrationInterface' not found
*
*/
require_once( ABSPATH . 'wp-content/plugins/woocommerce-blocks/src/Integrations/IntegrationInterface.php');
class WooCommerce_Example_Plugin_Integration extends IntegrationInterface {
public function get_name() {
return 'woocommerce-example-plugin';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment