當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wc_cart_totals_coupon_label函數代碼示例

本文整理匯總了PHP中wc_cart_totals_coupon_label函數的典型用法代碼示例。如果您正苦於以下問題:PHP wc_cart_totals_coupon_label函數的具體用法?PHP wc_cart_totals_coupon_label怎麽用?PHP wc_cart_totals_coupon_label使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wc_cart_totals_coupon_label函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wc_cart_totals_subtotal_html

</th>
			<td><?php 
wc_cart_totals_subtotal_html();
?>
</td>
		</tr>

		<?php 
foreach (WC()->cart->get_coupons() as $code => $coupon) {
    ?>
			<tr class="cart-discount coupon-<?php 
    echo esc_attr(sanitize_title($code));
    ?>
">
				<th><?php 
    wc_cart_totals_coupon_label($coupon);
    ?>
</th>
				<td><?php 
    wc_cart_totals_coupon_html($coupon);
    ?>
</td>
			</tr>
		<?php 
}
?>

		<?php 
if (WC()->cart->needs_shipping() && WC()->cart->show_shipping()) {
    ?>
開發者ID:olechka1505,項目名稱:hungrylemur,代碼行數:30,代碼來源:new-page.php

示例2: foreach

</td>
		</tr>

		<?php 
foreach (WC()->cart->get_coupons() as $code => $coupon) {
    ?>
			<tr class="cart-discount coupon-<?php 
    echo esc_attr(sanitize_title($code));
    ?>
">
				<th><?php 
    wc_cart_totals_coupon_label($coupon);
    ?>
</th>
				<td data-title="<?php 
    echo esc_attr(wc_cart_totals_coupon_label($coupon, false));
    ?>
"><?php 
    wc_cart_totals_coupon_html($coupon);
    ?>
</td>
			</tr>
		<?php 
}
?>

		<?php 
if (WC()->cart->needs_shipping() && WC()->cart->show_shipping()) {
    ?>

			<?php 
開發者ID:Carfulan-Group,項目名稱:SYS-Consumables-Store,代碼行數:31,代碼來源:cart-totals.php

示例3: test_wc_cart_totals_coupon_label

 /**
  * Test wc_cart_totals_coupon_label().
  *
  * @since 2.4
  */
 public function test_wc_cart_totals_coupon_label()
 {
     $coupon = WC_Helper_Coupon::create_coupon();
     $this->expectOutputString(apply_filters('woocommerce_cart_totals_coupon_label', 'Coupon: ' . $coupon->code), wc_cart_totals_coupon_label($coupon));
     WC_Helper_Coupon::delete_coupon($coupon->id);
 }
開發者ID:coderkevin,項目名稱:woocommerce,代碼行數:11,代碼來源:functions.php

示例4: do_action

            }
        }

        do_action( 'woocommerce_review_order_after_cart_contents' );
        ?>
        </tbody>
        <tfoot>

        <tr class="cart-subtotal">
            <th><?php _e( 'Cart Subtotal', 'yit' ); ?></th>
            <td><?php wc_cart_totals_subtotal_html(); ?></td>
        </tr>

        <?php foreach ( WC()->cart->get_coupons() as $code => $coupon ) : ?>
            <tr class="cart-discount coupon-<?php echo esc_attr( $code ); ?>">
                <th><?php wc_cart_totals_coupon_label( $coupon ); ?></th>
                <td><?php wc_cart_totals_coupon_html( $coupon ); ?></td>
            </tr>
        <?php endforeach; ?>

        <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>

            <?php do_action( 'woocommerce_review_order_before_shipping' ); ?>

            <?php wc_cart_totals_shipping_html(); ?>

            <?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
        <?php endif; ?>

        <?php foreach ( WC()->cart->get_fees() as $fee ) : ?>
            <tr class="fee fee-<?php echo $fee->id ?>">
開發者ID:simonsays88,項目名稱:costa,代碼行數:31,代碼來源:review-order.php

示例5: foreach

?>
:    <span><?php 
echo $subtotal;
?>
</span></li>
		
		
		<?php 
foreach (WC()->cart->get_coupons() as $code => $coupon) {
    ?>
			<ul class="cart-discount coupon-<?php 
    echo esc_attr(sanitize_title($code));
    ?>
">
				<li><?php 
    wc_cart_totals_coupon_label(true);
    ?>
</li>
				<li><?php 
    wc_cart_totals_coupon_html(true);
    ?>
</li>
			</ul>
		<?php 
}
?>
		
		<li class="cartGrandT"><?php 
_e('Total', 'woocommerce');
?>
:    <span><?php 
開發者ID:andersonaguiaralves,項目名稱:meiotomloja,代碼行數:31,代碼來源:cart-totals.php

示例6: wc_cart_totals_subtotal_html

</th>
			<td><?php 
wc_cart_totals_subtotal_html();
?>
</td>
		</tr>

		<?php 
foreach (WC()->cart->get_coupons() as $code => $coupon) {
    ?>
			<tr class="cart-discount coupon-<?php 
    echo esc_attr(sanitize_title($code));
    ?>
">
				<th><?php 
    wc_cart_totals_coupon_label();
    echo '<span>' . esc_attr(sanitize_title($code)) . '</span>';
    ?>
</th>
				<td><?php 
    wc_cart_totals_coupon_html($coupon);
    ?>
</td>
			</tr>
		<?php 
}
?>

		<?php 
if (WC()->cart->needs_shipping() && WC()->cart->show_shipping()) {
    ?>
開發者ID:romapad,項目名稱:sound-themplate,代碼行數:31,代碼來源:review-order.php


注:本文中的wc_cart_totals_coupon_label函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。