Refinery CRM provides filters that allow developers to customize plugin behavior. Use these hooks in a custom plugin or in your theme’s functions.php to modify settings and distribution logic.
Filters
refinery_crm_distribution
Filter the active distribution channel. The distribution channel determines where the plugin was purchased and controls which license, support, and documentation URLs are displayed.
apply_filters( 'refinery_crm_distribution', string $distribution )
Parameters:
$distribution(string) — The current distribution channel. Default is'direct'. Possible values:'direct','woocommerce_com'.
Example:
add_filter( 'refinery_crm_distribution', function( $distribution ) {
return 'woocommerce_com';
} );
refinery_crm_wc_settings
Filter the CRM settings array registered under the WooCommerce Settings tab. Use this to add, remove, or modify CRM settings fields that appear under WooCommerce > Settings > CRM.
apply_filters( 'refinery_crm_wc_settings', array $settings )
Parameters:
$settings(array) — Array of WooCommerce settings fields in the standardWC_Settings_APIformat.
Example:
add_filter( 'refinery_crm_wc_settings', function( $settings ) {
$settings[] = array(
'title' => 'Custom CRM option',
'id' => 'refinery_crm_custom_option',
'type' => 'checkbox',
'desc' => 'Enable a custom CRM feature.',
);
return $settings;
} );