if ( !isset( $listResult['list'] ) ) {
return false;
}
- $registrants = $listResult['list'];
- $registrantCount = $this->getStats(str_replace('T.', '', $whereEvent));
+ $registrants = $listResult['list'];
+ $registrantCount = $this->getStats( str_replace( 'T.', '', $whereEvent ) );
// Make sure we received registrants
- if (!is_array($registrants) || count($registrants) == 0) {
+ if ( !is_array( $registrants ) || count( $registrants ) == 0) {
return false;
}
$customFieldsPluginActive = apply_filters( 'glm-members-customfields-plugin-active', false );
// For each registrant
- foreach ($registrants as $registrantKey=>$registrantVal) {
+ foreach ( $registrants as $registrantKey => $registrantVal ) {
// Try to get account
$registrants[$registrantKey]['account'] = false;
- if ($registrantVal['account']) {
- require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataAccount.php';
- $Accounts = new GlmDataRegistrationsAccount($this->wpdb, $this->config);
- $registrants[$registrantKey]['account'] = $Accounts->getEntry($registrantVal['account']);
+ if ( $registrantVal['account'] ) {
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH . '/data/dataAccount.php';
+ $Accounts = new GlmDataRegistrationsAccount( $this->wpdb, $this->config );
+ $registrants[$registrantKey]['account'] = $Accounts->getEntry( $registrantVal['account'] );
}
// Try to get any per Event custom field data
}
}
}
+ // Check for event custom field per registation
+ $fid = 'glm_reg_customfields_reg_event_' . $eventId;
+ $cRegId = $registrantVal['reg_request_event'];
+ $cRegData = apply_filters( 'glm-members-customfields-form-data-recall', '', $fid, $cRegId, false );
+ if ( isset( $cRegData ) && is_array( $cRegData ) && !empty( $cRegData ) ) {
+ $fields = $cRegData['form'];
+ if ( isset( $fields ) && is_array( $fields ) ) {
+ foreach ( $fields as $cField ) {
+ $custom_data[$cField['field_name']] = $cField['stored'];
+ }
+ }
+ }
+
// Check for level custom fields also
// Find all reg_class for this event
$reg_classes = $this->wpdb->get_results(
* Plugin Name: GLM Associate - Event Registrations Add-On
* Plugin URI: http://www.gaslightmedia.com/
* Description: Add-on to integrate registrations into Events add-on.
- * Version: 1.4.2
+ * Version: 1.4.3
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersRegistrationsAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.4.2
+ * @version 1.4.3
*/
// Check that we're being called by WordPress.
* or updating that last position will result in cache-busting. Be
* sure to remove that 4th postion when doing a hotfix or release!
*/
-define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.4.2');
+define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_VERSION', '1.4.3');
define('GLM_MEMBERS_REGISTRATIONS_PLUGIN_DB_VERSION', '1.0.4');
// This is the minimum version of the GLM Members DB plugin require for this plugin.