/** * Update description. * * Render the corresponding description for the condition key. * * @since 1.0.0 */ public function update_condition_description() { check_ajax_referer('wpc-ajax-nonce', 'nonce'); $condition = sanitize_text_field($_POST['condition']); $wp_condition = new WCASV_Condition(null, null, $condition); if ($desc = $wp_condition->get_description()) { ?> <span class='wpc-description wpc-no-description <?php echo $desc; ?> -description'><?php die; } ?> <span class='wpc-description <?php echo $wp_condition->condition; ?> -description'> <img class='help_tip' src='<?php echo WC()->plugin_url(); ?> /assets/images/help.png' height='24' width='24' data-tip="<?php echo esc_html($wp_condition->get_description()); ?> " /> </span><?php die; }