ramphor / memberships
Embed memberships for WordLand theme and plugins
dev-master
2021-04-29 10:47 UTC
This package is auto-updated.
Last update: 2024-10-29 06:30:58 UTC
README
Use Memeberships class in PHP header file
use Ramphor\Memberships\Memberships;
Create memberships instance
$membershipParentMenu = 'parent-menu-slug';
$memberships = Memberships::createInstance(
'wordland',
$membershipParentMenu
);
Notes: If you want to enable profile fields for memberships plan please call below method
$memberships->enableProfileFields();
Execute memberships features
You can execute memberships directly by the way $memberships->run();
or use WordPress hook same below code
add_action(
'after_setup_theme',
array( $memberships, 'run' )
);
Notes: Please use hooks before hook init
such as: plugins_loaded
, after_setup_theme
, etc