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