Verified Commit 5aa74e66 authored by Andrei Mondoc's avatar Andrei Mondoc Committed by Kevin Cristiano

add civi_wp_rest/plugin/replace_mailing_tracking_urls filter

Signed-off-by: Kevin Cristiano's avatarKevin Cristiano <kcristiano@kcristiano.com>
parent 5139012d
......@@ -69,8 +69,19 @@ class Plugin {
*/
private function setup_objects() {
if ( CIVICRM_WP_REST_REPLACE_MAILING_TRACKING ) {
/**
* Filter to replace the mailing tracking URLs.
*
* @since 0.1
* @param bool $replace_mailing_tracking_urls
*/
$replace_mailing_tracking_urls = apply_filters( 'civi_wp_rest/plugin/replace_mailing_tracking_urls', false );
// keep CIVICRM_WP_REST_REPLACE_MAILING_TRACKING for backwards compatibility
if (
$replace_mailing_tracking_urls
|| ( defined( 'CIVICRM_WP_REST_REPLACE_MAILING_TRACKING' ) && CIVICRM_WP_REST_REPLACE_MAILING_TRACKING )
) {
// register mailing hooks
$mailing_hooks = ( new Mailing_Hooks )->register_hooks();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment