jjci
Forum Replies Created
-
I have sent the output of the var_dump($subscriber) in a separate email.
1)
From the main email menu, for this newsletter, I clicked on ‘Preview’.
I received a PHP error regarding a circular reference.2)
I updated the newsletter details to use a test user list, and then sent it.
The email arrived, but there was no value displayed for the ‘subscriber’ parameter.So far, I have been testing my newsletter by sending a preview to a specific email address.
How do I access the $subscriber value?
I have tried to use it within the code, but it’s null.I think my confusion is based on the sample code provided on the MailPoet website regarding custom shortcodes, as follows:
add_filter(‘mailpoet_newsletter_shortcode’, ‘mailpoet_custom_shortcode’, 10, 5);
function mailpoet_custom_shortcode($shortcode, $newsletter, $subscriber, $queue, $newsletter_body) {…How are the parameters, other than $shortcode, accessed by this code? I know that there is no reference to these other parameter values in the body of the code. However, I have tried to add code to display the other inbound parameter values, but they don’t appear to be populated.
I have tried to execute the custom shortcode specifying a value for $subscriber, but the code does not recognize any inbound value other than $shortcode.I can resolve my original issue if I can access the Subscriber value as each email is generated as the relevant list. However, I am now confused about how the custom shortcodes pass parameter values.