Site logo

[Resolved] Another WooCommerce Hook Question

Home Forums Support [Resolved] Another WooCommerce Hook Question

Home Forums Support Another WooCommerce Hook Question

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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

    #2544628
    Ying
    Staff
    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.

    #2546515
    stesch79

    Hi Ying

    Many thanks for your reply and the hint. Much appreciated! With the Code Snippets plugin, it works!

    Kind regards,
    Stephan

    #2547915
    Ying
    Staff
    Customer Support

    Nice 🙂 Glad to hear that!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.