Skip to content

Update Meetup tracker sync#1572

Open
dd32 wants to merge 8 commits intoproductionfrom
update-meetup-sync
Open

Update Meetup tracker sync#1572
dd32 wants to merge 8 commits intoproductionfrom
update-meetup-sync

Conversation

@dd32
Copy link
Copy Markdown
Member

@dd32 dd32 commented Jan 13, 2026

This updates the Meetup listings to:

  • Include Lat / Lon coords for groups
  • Include the Member count on the overview
  • Automatically remove a group from the chapter-post_status when it's no longer in existence
  • Properly exclude the WordPress organizer from the listings

Split some items into #1573

@dd32 dd32 added the [Component] WCPT WordCamp and meetup post types, applications, trackers, mentors label Jan 13, 2026
Comment on lines +361 to +388
// If the group doesn't exist, mark it as canceled. Note: This is different from removed-from-chapter.
if ( false === $group_details ) {
// Only mark active groups as removed.
if ( ! in_array( get_post( $post_id )->post_status, [ 'wcpt-mtp-active', 'wcpt-mtp-dormant', 'wcpt-mtp-nds-nw-ow' ] ) ) {
return;
}

add_post_meta(
$post_id,
'_note',
array(
'timestamp' => time(),
'user_id' => 0,
'message' => 'Meetup no longer exists per Meetup.com API sync.',
)
);

$self_loop_prevent = true;

wp_update_post( array(
'ID' => $post_id,
'post_status' => 'wcpt-mtp-canceled',
) );

$self_loop_prevent = false;

return;
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure I want to automatically remove groups from the post_status, but given the number of meetups who were listed as being active but no longer existed for whatever reason..

Comment on lines +440 to +442
update_post_meta( $post_id, 'Meetup Coordinates', "{$group_details['lat']},{$group_details['lon']}" );
update_post_meta( $post_id, '_lat', $group_details['lat'] );
update_post_meta( $post_id, '_lon', $group_details['lon'] );
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was adding this such that I could source the location of all WP Meetups via this listing.

I'm not sure that this is viable however, as there isn't a strict 1:1 mapping of groups to entries here, as the entries are more applications-for-meetups tracking, and there can be multiple entries for a singular active meetup.

@dd32 dd32 mentioned this pull request Jan 13, 2026
@Successfulsebunya
Copy link
Copy Markdown

I personally suggest that this remove be made manually or set a trigger to be able to do it properly. This will help on accidental deletions and further errors that could arise from the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Component] WCPT WordCamp and meetup post types, applications, trackers, mentors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants