These are some of the hooks to declare for collecting data and compatibility.
Note
PLUGIN_NAME is the name of your plugin as in ‘active_plugins’ wordpress option.
ct_ultimate_gdpr_controller_plugins_compatible_PLUGIN_NAME
![]()
Example: Woocommerce Ultimate Discount plugin:
ct-woocommerce-ultimate-discount/ctUltimateDiscount.php
Declare Compatible
add_filter( "ct_ultimate_gdpr_controller_plugins_compatible_ct-woocommerce-ultimate-discount/ctUltimateDiscount.php", '__return_true' );Declare Not Compatible
add_filter( "ct_ultimate_gdpr_controller_plugins_compatible_ct-woocommerce-ultimate-discount/ctUltimateDiscount.php", '__return_false' );Declare Partly Compatible
add_filter( "ct_ultimate_gdpr_controller_plugins_compatible_ct-woocommerce-ultimate-discount/ctUltimateDiscount.php", is_compatible ); function is_compatible() { return CT_Ultimate_GDPR_Controller_Plugins::PLUGIN_COMPATIBLE_PARTLY; }
ct_ultimate_gdpr_controller_plugins_collects_data_PLUGIN_NAME
![]()
Example: Woocommerce Ultimate Discount plugin:
ct-woocommerce-ultimate-discount/ctUltimateDiscount.php
Declare to collect
add_filter( "ct_ultimate_gdpr_controller_plugins_collects_data_ct-woocommerce-ultimate-discount/ctUltimateDiscount.php", '__return_true' );Declare to not collect
add_filter( "ct_ultimate_gdpr_controller_plugins_collects_data_ct-woocommerce-ultimate-discount/ctUltimateDiscount.php", '__return_false' );
You may extend functionality of Ultimate GDPR & CCPA by implementing services features for your plugin:
Extend php class CT_Ultimate_GDPR_Service_Abstract or implement the CT_Ultimate_GDPR_Service_Interface interface
Example:
class CT_Ultimate_GDPR_Service_Contact_Form_7 extends CT_Ultimate_GDPR_Service_Abstract { }Implement required methods (some actions can be left empty)
Add an object of your service to the array of services to be registered in Ultimate GDPR & CCPA:
apply_filters( 'ct_ultimate_gdpr_load_services', array(), $options, $this->services );or, if you extended CT_Ultimate_GDPR_Service_Abstract, it will autoregister when instantiated.
To add options to admin, utilize WordPress Options API function ‘add_settings_field’ on ‘current_screen’ hook. This is hook automatically in abstract class by the ‘add_option_fields’ function.
There is also a possibility of adding new controller (and therefore new menu page) to the plugin:
Either extend php class CT_Ultimate_GDPR_Controller_Abstract or implement the CT_Ultimate_GDPR_Controller_Interface intefrace
Example:
class CT_Ultimate_GDPR_Controller_Forgotten extends CT_Ultimate_GDPR_Controller_Abstract { }Implement required methods (some actions can be left empty)
Add an object of your controller to the array of controllers to be registered in Ultimate GDPR & CCPA:
apply_filters( 'ct_ultimate_gdpr_controllers', array() );To add a menu page, you can utilize ‘add_menu_page’ function if you extended the abstract class.
To add options to admin, please utilize WordPress Options API function ‘add_settings_field’