From fde63348758a03dc8ba41e80cba65f8c3542f65e Mon Sep 17 00:00:00 2001 From: Deepak Gupta Date: Mon, 20 May 2024 14:29:48 +0530 Subject: [PATCH] Update README.md Update code --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d26805..370a9be 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,16 @@ https://developer.wordpress.org/block-editor/reference-guides/packages/packages- ### Adding dependency for Custom Plugins 1. Adding BuddyBoss Platform and Platform Pro dependency -```composer require acrosswp/acrosswp-buddypress-or-buddyboss-dependency``` +```composer require acrosswp/acrosswp-buddypress-or-buddyboss-dependency``` +and then add the below code in function load_dependencies after vendor autoload file included ```require_once( WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_PATH . 'vendor/autoload.php' );``` +``` +/** + * Add the dependency for the call + */ + if ( class_exists( 'AcrossWP_BuddyPress_BuddyBoss_Platform_Dependency' ) ) { + new AcrossWP_BuddyPress_BuddyBoss_Platform_Dependency( $this->get_plugin_name(), WORDPRESS_PLUGIN_BOILERPLATE_FILES ); + } +``` 2. Adding BuddyBoss Platform dependency ```composer require acrosswp/acrosswp-buddyboss-dependency```