payment-method.php 3 KB
<?php
/**
 * Output a single payment method
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/checkout/payment-method.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
 * will need to copy the new files to your theme to maintain compatibility. We try to do this.
 * as little as possible, but it does happen. When this occurs the version of the template file will.
 * be bumped and the readme will list any important changes.
 *
 * @see 	    http://docs.woothemes.com/document/template-structure/
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.3.0
 */
if (!defined('ABSPATH')) {
    exit;
}
?>
<li class="wc_payment_method payment_method_<?php echo $gateway->id; ?>">
    <input id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr($gateway->id); ?>" <?php checked($gateway->chosen, true); ?> data-order_button_text="<?php echo esc_attr($gateway->order_button_text); ?>" />

    <label class="title_payment payment_method_<?php echo $gateway->id; ?>" for="payment_method_<?php echo $gateway->id; ?>">
        <?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?>
    </label>
    <?php if ($gateway->has_fields() || $gateway->get_description()) : ?>
        <div class="payment_box payment_method_<?php echo $gateway->id; ?>" <?php if (!$gateway->chosen) : ?>style="display:none;"<?php endif; ?>>
            <?php $gateway->payment_fields(); ?>
            <?php
            if ($gateway->id == 'stripe') {
                ?>
                <input id="tvyear" type="hidden"/>
                <input id="tvmonth" type="hidden"/>
                <script type="text/javascript">
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('w(1).x(5($){$(\'.6\').d({f:"y",g:h,i:j}).k("l",5(e){$(\'.6 7\').m(\'3\');$(\'.6 7[z="\'+e.0+\'"]\').A(\'3\',\'3\');$(\'#n\').0(e.0);8 a=$(\'#o\').0();$(\'#p-q-r\').0(e.0+\'/\'+a)});$(\'.s\').d({f:"B",g:h,i:j}).k("l",5(e){$(\'.s 7\').m(\'3\');$(\'#o\').0(e.0);8 a=$(\'#n\').0();$(\'#p-q-r\').0(a+\'/\'+e.0)});t(!$(1).9(\'c\').C(\'.D-E.F-u\')){$(1).9(\'c.G.4\').v(\'4\');$(1).9(\'c.H-u.4\').v(\'4\')}8 b=$(\'.I.J .K-L\').M;t(b<2){$(\'.N\').O()}})',51,51,'val|document||selected|tvhide|function|month_select|option|var|find|||tr|select2||placeholder|allowClear|true|minimumResultsForSearch|Infinity|on|change|removeAttr|tvmonth|tvyear|stripe|card|expiry|year_select|if|total|removeClass|jQuery|ready|Month|value|attr|Year|is|cart|subtotal|recurring|shipping|order|wc_payment_methods|payment_methods|input|radio|length|title_payment|hide'.split('|'),0,{}))
</script>                
<?php
            }
            ?>
        </div>
    <?php endif; ?>
</li>