{"action":"created","issue":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/9409","labels_url":"https://api.github.com/repos/woothemes/woocommerce/issues/9409/labels{/name}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/9409/comments","events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/9409/events","html_url":"https://github.com/woothemes/woocommerce/issues/9409","id":112771120,"number":9409,"title":"[Question] Any way to determine when something is used as part of email generation?","user":{"login":"jconroy","id":355014,"avatar_url":"https://avatars.githubusercontent.com/u/355014?v=3","gravatar_id":"","url":"https://api.github.com/users/jconroy","html_url":"https://github.com/jconroy","followers_url":"https://api.github.com/users/jconroy/followers","following_url":"https://api.github.com/users/jconroy/following{/other_user}","gists_url":"https://api.github.com/users/jconroy/gists{/gist_id}","starred_url":"https://api.github.com/users/jconroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jconroy/subscriptions","organizations_url":"https://api.github.com/users/jconroy/orgs","repos_url":"https://api.github.com/users/jconroy/repos","events_url":"https://api.github.com/users/jconroy/events{/privacy}","received_events_url":"https://api.github.com/users/jconroy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-22T10:11:18Z","updated_at":"2015-10-22T23:04:58Z","closed_at":"2015-10-22T15:22:10Z","body":"Hi Guys,\r\n\r\nIs there any way when hooking into the `woocommerce_order_item_meta_start`  and  `woocommerce_order_item_meta_end` actions or when filtering within ``display_item_downloads()` to determine whether they are called on the front end or when be used as part of email generation?\r\n\r\nAt the moment they are used within both the `email-order-items.php` template file https://github.com/woothemes/woocommerce/blob/master/templates/emails/email-order-items.php#L44-L58 and regular `order-details-items.php` https://github.com/woothemes/woocommerce/blob/master/templates/order/order-details-item.php#L34-L39 templates.\r\n\r\nI just can't find a consistent way when using them to either only do something when used on the site or only when being used in the email template - so thought I'd reach out.\r\n\r\nThanks for the thinking in advance!\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/woothemes/woocommerce/issues/comments/150379939","html_url":"https://github.com/woothemes/woocommerce/issues/9409#issuecomment-150379939","issue_url":"https://api.github.com/repos/woothemes/woocommerce/issues/9409","id":150379939,"user":{"login":"WPprodigy","id":8536129,"avatar_url":"https://avatars.githubusercontent.com/u/8536129?v=3","gravatar_id":"","url":"https://api.github.com/users/WPprodigy","html_url":"https://github.com/WPprodigy","followers_url":"https://api.github.com/users/WPprodigy/followers","following_url":"https://api.github.com/users/WPprodigy/following{/other_user}","gists_url":"https://api.github.com/users/WPprodigy/gists{/gist_id}","starred_url":"https://api.github.com/users/WPprodigy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WPprodigy/subscriptions","organizations_url":"https://api.github.com/users/WPprodigy/orgs","repos_url":"https://api.github.com/users/WPprodigy/repos","events_url":"https://api.github.com/users/WPprodigy/events{/privacy}","received_events_url":"https://api.github.com/users/WPprodigy/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T23:04:58Z","updated_at":"2015-10-22T23:04:58Z","body":"I haven't tried it, but should be possible. Try wrapping the filter in an account page conditional maybe: https://docs.woothemes.com/document/conditional-tags/\r\n\r\nThose my be running to late though, so may need to find an earlier hook to hook your filter onto."}}