• Resolved Cognisant_2000

    (@cognisant_2000)


    Hi Folks

    There appears to be a bug in your plug-in.

    The order of fields set up in MailChimp do not appear on the website. For example, Surname is showing as the last field instead of the field after the name.

    We have fixed this by adding a code to the plug-in but of course every time the plug-in gets updated, this code gets overwritten and we have to add it again.

    Please can you test this and see if you can fix it in your next release?

    This is the problem:

    In the file plugins/mailchimp/mailchimp_widget.php in line 391 you have
    <div class="mc_merge_var" style="order:'.$data['display_order'].'">

    We have added style="order:'.$data['display_order'].'"

    Regards

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Dharmesh Patel

    (@dharm1025)

    Hi @cognisant_2000,

    Thanks for reporting the issue.

    In the recent release (1.7.0), we updated the Subscribe Form block, which now lets you reorder form fields, edit form labels, and more. You can use the block to arrange the fields as needed.


    If you’re still using the old widget or shortcode, you can fix the field order by adding the code snippet below to your theme’s functions.php file. This will ensure your changes aren’t overwritten during plugin updates. However, we still recommend switching to the block. Please let us know if you run into any difficulties setting it up.

    add_filter( 'option_mc_merge_vars', function( $value ) {
    if ( empty( $value) || ! is_array( $value ) ) {
    return $value;
    }

    // Reorder the merge vars by display order.
    usort($value, function ($a, $b) {
    return $a['display_order'] <=> $b['display_order'];
    });
    return $value;
    } );

    We’ve also created a GitHub issue to address this within the plugin itself.

    Thanks!

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    Thanks for your quick reply.

    That has fixed it.

    Regards

    Plugin Support Jeffrey Paul

    (@jeffpaul)

    @cognisant_2000 great to hear things are working as expected, thanks for confirming! If you have a moment to leave a positive review, that would be greatly appreciated.

    Thread Starter Cognisant_2000

    (@cognisant_2000)

    Hi @jeffpaul

    I would be very happy to leave a review for you but the link you have provided is not for this plug-in.

    Regards

    Plugin Support Jeffrey Paul

    (@jeffpaul)

    @cognisant_2000 the link I shared is for Mailchimp List Subscribe Form: https://wordpress.org/support/plugin/mailchimp/reviews/#new-post. Perhaps you’re thrown off by the fact it has a shorter slug of mailchimp only?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.