Connecting HivePress with third party platforms

Hello, we are looking for a method to connect HivePress with non wordpess platforms. For example when a new listing is published in HivePress this would automatically create a post in our circle.so community.

Was hoping for a ‘no-code’ solution. We have tested other listing platforms such as WP Jobs Manager which can do the above via a tool such as zapier.

Any advice on how we could do the same with HivePress?

1 Like

A code snippet is required in this case, because Circle is a SaaS platform (like other platforms available on Zapier) so it has a public API, while HivePress is a self-hosted software. Please check if Zapier or Circle has a webhook for publishing, then you can try using this snippet:

add_action(
	'hivepress/v1/models/listing/update_status',
	function($listing_id, $new_status, $old_status, $listing){
		if($listing && 'publish' === $new_status){
			
			// Send data.
			wp_remote_post(
			'example.com',
			[
				'body' => [
					'title' => $listing->get_title(),
					'description'   => $listing->get_description(),
				],
			]
		);
		}	
	},
	1000,
	4
);

You’ll need to change the URL and parameters for the request above, but it should be ok once set up, it sends a request to a third-party webhook with the listing title and description once the listing is published in HivePress.

Hope this helps.

@yevhen thanks for the snippet. We will give it a try. Did manage to publish into circle via the RSS feed and zapier. Will run more tests.

By the way HivePress is great!

Thanks

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.