WordPress.org

Ready to get started?Download WordPress

Forums

Email Encoder Bundle - Protect Email Address
[resolved] [Plugin: Email Encoder Bundle] Override automatic encoding on one page (3 posts)

  1. wallyO
    Member
    Posted 2 years ago #

    Hello and thanks for the plugin.
    Plugin is installed and working beautifully, automatically encoding all mail-to links and text email address.
    My problem occurs in conjunction with woo-commerce (and another cart plugin I tried) because they output a logged in user's email address into form input values to a page named checkout. eeb unfortunately mashes these email addresses.
    I have been editing my themes function.php trying to override eeb filters on individual pages with add_action logic and remove_filter.

    function my_function_name() {
       if(is_page('checkout')){
          remove_filter( 'the_content', array( $this, '_filter_callback' ), $priority );
       }
    }
    add_action('hook_name', 'my_function_name');

    But after much experimenting I have had no success.
    I would appreciate any help with this.

    http://wordpress.org/extend/plugins/email-encoder-bundle/

  2. wallyO
    Member
    Posted 2 years ago #

    I have a solution, but sadly it is a dirty, dirty hack. (hang head in shame)
    It is a direct hack of the plugin file
    email-encoder-bundle\email-encoder-bundle.php
    Directly after (line 142)

    add_filter( 'the_content', array( $this, '_filter_callback' ), $priority );

    I added the following code;

    global $post;
    if ($post->post_name === 'checkout' || $post->post_name === 'pay' || $post->post_name === 'order-received' || $post->post_name === 'change-password' || $post->post_name === 'edit-address' || $post->post_name === 'view-order' || $post->post_name === 'order-tracking' || $post->post_name === 'my-account') {
      remove_filter( 'the_content', array( $this, '_filter_callback' ), $priority );
    }

    This hack will be over written when the plugin updates.
    If anyone knows how to do the same thing in the functions.php then please share.

  3. freelancephp
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for sharing your solution. The plugin is not updated frequently though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic