//}
- if ( defined("GLM_MEMBERS_PLUGIN_PATH") ) {
+ if ( isset($this->config['addOns']['glm-member-db']) ) {
$members = $this->get_members_summary();
- $summary['members'] = array("members" => $members);
+ $summary[] = array("members" => $members);
}
if ( defined("GLM_MEMBERS_EVENTS_PLUGIN_PATH") ) {
$events = $this->get_events_summary();
- $summary['events'] = array("events" => $events);
+ $summary[] = array("events" => $events);
}
if ( defined("GLM_MEMBERS_COUPONS_PLUGIN_PATH") ) {
- $summary['coupons'] = array("coupons", $this->get_coupons_summary() );
+ $summary[] = array("coupons", $this->get_coupons_summary() );
}
if ( defined("GLM_MEMBERS_PACKAGING_PLUGIN_PATH") ) {
- $summary['packaging'] = array("packaging", $this->get_packages_summary() );
+ $summary[] = array("packaging", $this->get_packages_summary() );
}
- return rest_ensure_response( array_values( $summary ) );
+ return rest_ensure_response( get_object_vars( (object) array_values( $summary ) ) );
},
)
)