_e('Or match all of the following rules to apply the validation rule:', 'woocommerce-advanced-shipping-validation'); ?> </p><?php foreach ($conditions as $condition_id => $condition) { $wp_condition = new WCASV_Condition($condition_id, $condition_group, $condition['condition'], $condition['operator'], $condition['value']); $wp_condition->output_condition_row(); } ?> </div> <p class='or-text'><strong><?php _e('Or', 'woocommerce-advanced-shipping-validation'); ?> </strong></p><?php } } else { ?> <div class='wpc-condition-group wpc-condition-group-0' data-group='0'><?php $wp_condition = new WCASV_Condition(); $wp_condition->output_condition_row(); ?> </div><?php } ?> </div> <a class='button wpc-condition-group-add' href='javascript:void(0);'><?php _e('Add \'Or\' group', 'woocommerce-advanced-shipping-validation'); ?> </a>
/** * 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; }