• Hi,

    I’m trying to integrate Kadence WooCommerce Email Designer with another plugin taht sends transactional emails and I miss the ability to add default subject, heading and body values for the emails to Kadence_Woomail_Settings::$default_values. My simple solution was to change line 2409 of includes/class-kadence-woomail-settings.php from

    return self::$default_values;

    to

    return apply_filters( 'kadence_woomail_default_values', self::$default_values );

    I think developers will appreciate if you consider adding similar change in your next release.

    All the best,
    Milen Petrinski – Gonzo

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey,
    Thanks for posting! I’m happy to here you are integrating. I would love to know what plugin it’s for.

    There is a filter

    kadence_woomail_email_settings_default_values

    In the latest version of the plugin you can see this on line 2960
    self::$default_values = apply_filters( 'kadence_woomail_email_settings_default_values', $default_values );

    It’s been there since the beginning ??

    Ben

    Oops, sorry, I’ve been running an old version, it seems. I updated the plugin, I can see the filter now, great, thank you. It wasn’t there in 1.2.2.

    All the best,
    Milen

    Yep it was recent, your are correct. I remember now, I added it when I realized it was the only thing you couldn’t filter into while adding the new filter that more easily allows plugins to add their emails for previews only.

    /**
    				Looking for Structure that looks like this:
    				array(
    					'email_type' => 'email_example_slug',
    					'email_name' => 'Email Example',
    					'email_class' => 'Custom_WC_Email_Extend',
    					'email_heading' => __( 'Placeholder for Heading', 'plugin' ),
    				);
    			*/
    			$add_email_previews = apply_filters( 'kadence_woocommerce_email_previews', array() );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow filtering Kadence_Woomail_Settings::$default_values’ is closed to new replies.