mage-eventpress/inc/template-prts/price.php

20 lines
556 B
PHP
Raw Normal View History

2020-01-22 07:15:24 -05:00
<?php
2020-05-24 04:17:41 -04:00
if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
2020-01-22 07:15:24 -05:00
add_action('mep_event_price','mep_ev_price');
2020-05-24 04:17:41 -04:00
if (!function_exists('mep_ev_price')) {
2020-01-22 07:15:24 -05:00
function mep_ev_price(){
2020-03-19 08:34:31 -04:00
global $post,$event_meta;
ob_start();
if($event_meta['_price'][0]>0){
if($event_meta['mep_price_label'][0]){ ?>
2021-10-29 17:14:29 -04:00
<h3><?php echo esc_attr($event_meta['mep_price_label'][0]); ?>: </h3>
2020-03-19 08:34:31 -04:00
<?php }
2021-10-29 17:14:29 -04:00
echo wc_price(esc_attr($event_meta['_price'][0]));
2020-03-19 08:34:31 -04:00
}
$content = ob_get_clean();
echo apply_filters('mage_event_single_price', $content,$post->ID);
2020-05-24 04:17:41 -04:00
}
2020-01-22 07:15:24 -05:00
}