Autoship Cloud Plugin Extensions for WooCommerce

When integrating custom-developed functionality or code that is intended to modify the core Autoship Cloud powered by QPilot plugin, you should create and extension plugin and register it with the core Autoship Cloud powered by QPilot plugin.

This document can be used by a WordPress developer to ensure that the requirements for creating & registering an extension plugin for Autoship Cloud.

Autoship Cloud Minimum Version Requirements

The Autoship Cloud plugin defines an Autoship_Version constant with the version of the plugin that is currently being run. This constant should be used to ensure the Autoship Cloud version being run is compatible with the custom-developed code.  

Example Code: 

	if ( !defined( 'Autoship_Version' ) || version_compare ( Autoship_Version, 2.3.6, '<' ) ) {
	// Do something since the Autoship Cloud powered by QPilot plugin version is NOT compatible  }

Register the Extension Plugin with Autoship Cloud

When custom code is developed to extend and integrate with the Autoship Cloud plugin it’s important that that code registers itself so that it’s displayed in the list of extensions currently integrated with the plugin under the Extensions tab under WP-Admin > Autoship Cloud > Settings >> Extensions ( tab ) which allows merchants and technical support visibility into any functionality that modifies the default behavior of the Autoship Cloud plugin.  

Registering custom code as an extension that modifies the default behavior of the Autoship Cloud powered by QPilot plugin also provides the QPilot Customer Success support team visibility into any customizations to a merchant's installation so that they can take precautions when offering support. 

There are 2 main hooks to use for registering a custom extension:

  1. The 'autoship_plugin_custom_extensions' filter found in the autoship_get_custom_extensions() function filters the list of registered extensions and passes an array of currently registered extensions to any hooked functions.  Custom code should add the unique extension name to this array.  This name will also be used in the second filter used for registering the codebase.
  2. The 'autoship_{YOUR_CUSTOM_EXTENSION_NAME}_plugin_row_additional_content' filter found in autoship_extensions_section ( ) function is used to add the custom extension’s description to the Autoship Cloud extension tab ( WP-Admin > Autoship Cloud > Settings >> Extensions ( tab ) ).  The value used in the dynamic portion of the filter should match the value passed to the  'autoship_plugin_custom_extensions' filter.  The function hooked to this filter should echo any description information that summarizes what the custom code does and how it modifies the Autoship Cloud plugin functionality.