MS Web Arts Rebranding Logo Icon
MS Web Arts Rebranding Logo
View Categories

Extending the Plugin

< 1 min read

Add a messaging provider

Core never talks to a chat plugin directly; it talks to a provider interface. To integrate another messaging plugin, implement WCOffers\Messaging\ProviderInterface and register it:

add_filter( 'wcoffers_messaging_providers', function ( $providers ) {
	$providers['my_chat'] = new My_Chat_Provider(); // implements ProviderInterface.
	return $providers;
} );

Use the bundled BetterMessagesProvider (src/Messaging/Providers/) as a reference implementation.

Add a marketplace resolver

Vendor plugins are abstracted the same way. Implement WCOffers\Vendors\SellerResolverInterface (who owns a product, is a seller active, display info) and register it via wcoffers_seller_resolvers. Dokan and single-vendor resolvers ship with the plugin.

Go to Top