Home › Forums › Support › Another WooCommerce Hook Question This topic has 3 replies, 2 voices, and was last updated 3 years, 3 months ago by Ying. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts February 23, 2023 at 12:42 pm #2544526 stesch79 Hi all I’ve searched through the forum for days, but did not find my answer. So here’s the question: I need to add this function/filter as an element (hook): https://gist.github.com/jessepearson/543772c0fe2b42b52c3c5addae77acf9 So I create a new hook. I set a custom hook “woocommerce_email_attachments”. But what do display rules do I choose? I’m helpless. Many thanks, Stephan February 23, 2023 at 2:52 pm #2544628 YingStaff Customer Support Hi Stephan, Looking at this function, it should be added using one of the methods introduced here: Adding PHP: https://docs.generatepress.com/article/adding-php/ Using a hook element is not the correct way to do this. February 25, 2023 at 7:10 am #2546515 stesch79 Hi Ying Many thanks for your reply and the hint. Much appreciated! With the Code Snippets plugin, it works! Kind regards, Stephan February 26, 2023 at 5:07 pm #2547915 YingStaff Customer Support Nice 🙂 Glad to hear that! Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In