Custom Woo Commerce email per product

1 replies
There is a script that changes the email that Woo Commerce sends out if you choose express shipping.
Here is the 'bail' code that cancels it if you are not using express shipping:
Code:
// bail if shipping method is not expedited
    if ( ! in_array( $this->object->get_shipping_method(), array( 'Three Day Shipping', 'Next Day Shipping' ) ) )
        return;
I am trying to change it so that it sends the custom email only if the product slug 'owl' is purchased.

I don't think I have this right?
Code:
// bail if customer didn't purchase owls
    if ( ! in_array( email_order_items_table(), array( 'owls' ) ) )
        return;
#custom emial #woo commerce
  • Profile picture of the author lordspace
    Nope. This will actually crash your site when that code is executed because that email_order_items_table() function is part of a class and shouldn't be called like that ... also it probably returns some content
    Signature

    Are you using WordPress? Have you tried qSandbox yet?

    {{ DiscussionBoard.errors[10448873].message }}

Trending Topics