Newfold module for 'Click to Buy' functionality in brand plugins.
- Detect clicks on elements with a
ctb-id
attribute if the user has thecanAccessGlobalCTB
capability.- These elements are in the marketplace section, notification banners, and even other plugins.
- Open a purchase modal window for the specific CTB id.
- The purchase window shows the same CTB MFE as in the hosting account manager with integrated payment to the hosting account.
- A user has the
canAccessGlobalCTB
capability, a CTB link should open a CTB modal and allow purchase. - A user does not have the
canAccessGlobalCTB
capability, a CTB link should not open a modal but the fallback link should open a new tab.
composer config repositories.newfold composer https://newfold-labs.github.io/satis
composer require newfold-labs/wp-module-global-ctb