How to reference custom fields in custom shortcode?
-
Custom fields can be called in the designer using shortcodes such as
[subscriber:cf_2].However, when creating a custom shortcode as described on https://kb.mailpoet.com/article/160-create-a-custom-shortcode, it doesn’t seem possible to access this custom field using
$subscriber->cf_2as one could come to expect.Just a little background: Basically, I’m trying to differentiate between male and female subscribers and change certain content such as the salutation dynamically. I don’t see a possibility of doing that without access to the custom field but I’m open to suggestions.
The topic ‘How to reference custom fields in custom shortcode?’ is closed to new replies.