• Resolved joeri2023

    (@joeri2023)


    Hi there, could you please help me with the following:
    I synchronize orders from a seller platform. I use a different invoice template for these orders. I can differentiate on e-mail address, since the platform user uses the platform e-mail address. I created two templates and checked two boxes:

    1. Don’t show this template in the orders page if the order doesn’t met this condition
    2. Field customer e-mail not contains x.com

    And for the other template:

    1. Don’t show this template in the orders page if the order doesn’t met this condition
    2. Field customer e-mail contains x.com

    The customer mailaddress is [email protected]

    In the order list, I see both templates available to download. How do I fix this?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Oh weird, could you send me an screenshot of one of the conditions please?

    Thread Starter joeri2023

    (@joeri2023)

    Here is the screenshot what happens. I removed the mailaddress due to privacy concerns

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Err sorry i tried to replicate the issue without luck, are you sure you want to use the customer email section?

    Have in mind that there are other types of emails like billing email and shipping email which are not the same as the customer email.

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Oh sorry i missed that part in your screenshot but it looks like you want to use the billing email address? If so you first need to create a custom field with this code:

    return $order->get_billing_email();

    Then use that custom field in your condition instead of using the customer email. I think that will do the trick.

    Regards!

    Thread Starter joeri2023

    (@joeri2023)

    Yes, it works on the order page now!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conditional show button based on e-mail does not work’ is closed to new replies.