PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Location of 'plain text' hook

  1. tfmwa

    My goal at the moment is to have an SMS sent to a restaurant owner after a customer fills out a reservation form on the new website.

    Right now, I'm looking to get this to work via an email notification sent to a special email address at the SMS gateway partner. At a later stage, I'm figuring out how to do it with a http get/post to the gateway people (preferred, but lack the time to figure it out at the moment).

    The link between form > email > SMS seems to work just fine, but the SMS contains < p > and < br > code in addition to the form data. I'd like to strip the html out of the SMS so it looks 'normal'.

    From what I've read, I need to change the HTML output for the forms to plain text output.
    And also manually insert all the merge tags (and not use '{All fields}' as that generates HTML output regardless).

    Apparently this can be achieved through:
    a) modifying a core plugin file (common.php)
    b) using a hook placed in functions.php (?)
    c) in the future via the admin interface.

    The hook seems to be available now, so that is preferred over modifying the core file.
    So I'm trying to implement this hook:

    I've added the code to a functions.php file in the child theme folder on this development website:

    Sidenote: I have changed both admin and user to 'text', so some of the code is probably redundant, but sadly I'm no php hero.

    The functions.php in the child theme is uploaded. I've inserted all merge tags manually. I've checked 'undo auto-formatting' on the email notification page (don't know the English term, working on a localized installation). But there's still HTML (< p > and < br >) in the SMS.

    What am I not seeing here?
    Thanks in advance!

    Posted 12 years ago on Monday April 2, 2012 | Permalink
  2. This was submitted via Priority Support also and we will handle it there. I am closing this topic.

    Posted 12 years ago on Monday April 9, 2012 | Permalink

This topic has been resolved and has been closed to new replies.