Support » Plugin: Events Manager » Remove meta tags on duplicate events (to make Publicize work again)

  • Resolved Gnaag


    Hello, there is an issue with duplicating events while using jetpack Publicize feature. On duplicated events jetpack Publicize is not working, while it thinks the post was already published to social networks. There is a simple fix. It is necessary to remove post meta that contains _wpas_ on duplicating. (The issue is being reffered to by publicize devloper here: )

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support caimin_nwl


    NetWebLogic Support


    Which version of Events Manager and Jetpack are you using?

    Hi, it is jetpack 5.0 and Events manager 5.7.3

    Plugin Support caimin_nwl


    NetWebLogic Support

    Thanks. I’ve passed this on to the Dev team.

    Plugin Author Marcus


    Thanks for spotting this and giving the background info on that meta key.

    I haven’t tested this out with JetPack but when duplicating events the _wpas_ key isn’t copied anymore.

    The fix, as you said, is easy. In events-manager/classes/em-event.php search for this (around line 1000):

    foreach($event_meta as $event_meta_key => $event_meta_vals){

    and under that line add this new line:

    if( $event_meta_key == '_wpas_' ) continue;

    This fix will be out in the next update.



    Thank you @netweblogic for pointing at right direction, but your solution didn’t work. It is not just one _wpas_ meta_key, but a bunch of them that starts with _wpas_. The correct line should be:

    if( strpos($event_meta_key, '_wpas_' ) !== false) continue;

    Now everything works as expected.

    Plugin Author Marcus


    I’ll need to set up a test environment for this… or would you be willing to let me test it out on your site?

    I would rather use this instead:
    if( preg_match('/^_wpas_/', $event_meta_key ) continue;

    since your suggestion might also remove other legit meta tags from another plugin like _some_other_plugin_wpas_something (unlikely but better to consider the possibilities!)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove meta tags on duplicate events (to make Publicize work again)’ is closed to new replies.