function file update
This commit is contained in:
parent
a143a4f6d5
commit
937d110d51
|
@ -2720,14 +2720,17 @@ if (!function_exists('mep_hide_event_order_data_from_thankyou_and_email')) {
|
|||
function mep_hide_event_order_data_from_thankyou_and_email($formatted_meta){
|
||||
$hide_location_status = mep_get_option('mep_hide_location_from_order_page', 'general_setting_sec', 'no');
|
||||
$hide_date_status = mep_get_option('mep_hide_date_from_order_page', 'general_setting_sec', 'no');
|
||||
$hide_location = $hide_location_status == 'yes' ? array('Location') : array();
|
||||
$hide_date = $hide_date_status == 'yes' ? array('Date') : array();
|
||||
$location_text = mep_get_option('mep_location_text', 'label_setting_sec', __('Location', 'mage-eventpress')) ? mep_get_option('mep_location_text', 'label_setting_sec', __('Location', 'mage-eventpress')) : 'Location';
|
||||
$date_text = mep_get_option('mep_event_date_text', 'label_setting_sec', __('Date', 'mage-eventpress')) ? mep_get_option('mep_event_date_text', 'label_setting_sec', __('Date', 'mage-eventpress')) : 'Date';
|
||||
|
||||
$hide_location = $hide_location_status == 'yes' ? array($location_text) : array();
|
||||
$hide_date = $hide_date_status == 'yes' ? array($date_text) : array();
|
||||
$default = array('event_id');
|
||||
$default = array_merge($default,$hide_date);
|
||||
|
||||
$hide_them = array_merge($default,$hide_location);
|
||||
|
||||
$temp_metas = [];
|
||||
|
||||
foreach($formatted_meta as $key => $meta) {
|
||||
if ( isset( $meta->key ) && ! in_array( $meta->key, $hide_them ) ) {
|
||||
$temp_metas[ $key ] = $meta;
|
||||
|
|
Loading…
Reference in New Issue