Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes, I suppose that's doable.I'm thinking to develop a woocommerce plugin that checks the subscription status by its ID and username: do you think it's feasable?
Not out of the box, but you can create custom API endpoints using CB Auto Actions. Example of how do this is as follows.Do joomla/CB provide any webservice to support this kind of integration?
$planId = (int) '[get_plan]';
$isActive = false;
foreach ( cbpaidSomethingMgr::getAllSomethingOfUser( $user ) as $subscriptions ) {
foreach ( array_keys( $subscriptions ) as $k ) {
if ( $subscriptions[$k]->getPlan()->get( 'id' ) != $planId ) {
continue;
}
$isActive = true;
break 2;
}
}
return array( 'active' => $isActive );
index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&users=USER_ID_HERE&plan=PLAN_ID_HERE&key=API_KEY_HERE&format=raw
index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&username=USERNAME_HERE&plan=PLAN_ID_HERE&key=API_KEY_HERE&format=raw
return \CBuser::getUserDataInstance( 0 )->loadByUsername( '[get_username]' );
Please Log in to join the conversation.