Esempio n. 1
0
 function __construct()
 {
     parent::__construct();
     add_action('wp_ajax_ce-update-coupon', array($this, 'ajax_save_coupon'));
     add_action('wp_ajax_ce-delete-coupon', array($this, 'ajax_delete_coupon'));
     add_action('wp_ajax_ce-check-coupon-code', array($this, 'ajax_check_coupon_code'));
     add_action('wp_ajax_nopriv_ce-check-coupon-code', array($this, 'ajax_check_coupon_code'));
     add_action('wp_ajax_ce-coupon-get-page', array($this, 'load_page'));
 }
Esempio n. 2
0
</th>
				<th><?php 
_e("Used Count", ET_DOMAIN);
?>
</th>
				<th><?php 
_e("Actions", ET_DOMAIN);
?>
</th>
			</tr>
			<?php 
$plans = et_get_payment_plans();
while ($coupon_list->have_posts()) {
    $coupon_list->the_post();
    global $post;
    $ce_coupon = new CE_Coupon();
    $coupon_data = $ce_coupon->generate_coupon_response(get_the_title());
    $date_limit = $coupon_data['date_limit'];
    $added_product = $coupon_data['added_product'];
    ?>
			<tr id="coupon-<?php 
    echo $post->ID;
    ?>
" data-coupon="<?php 
    echo $post->ID;
    ?>
" >
				<!-- coupon data -->
				<script id="coupon_<?php 
    echo $post->ID;
    ?>