当前位置: 首页>>代码示例>>PHP>>正文


PHP WC_Payment_Gateways::payment_gateways方法代码示例

本文整理汇总了PHP中WC_Payment_Gateways::payment_gateways方法的典型用法代码示例。如果您正苦于以下问题:PHP WC_Payment_Gateways::payment_gateways方法的具体用法?PHP WC_Payment_Gateways::payment_gateways怎么用?PHP WC_Payment_Gateways::payment_gateways使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WC_Payment_Gateways的用法示例。


在下文中一共展示了WC_Payment_Gateways::payment_gateways方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

        function wcpgsk_payments_form()
        {
            global $post;
            //, $woo;
            $postPayments = get_metadata('post', $post->ID, 'payment_gateways', false);
            $woogate = new WC_Payment_Gateways();
            $payments = $woogate->payment_gateways();
            //get_available_payment_gateways();
            foreach ($payments as $pay) {
                $checked = '';
                if (in_array($pay->id, $postPayments)) {
                    $checked = ' checked="yes" ';
                }
                ?>
  
				<input type="checkbox" <?php 
                echo $checked;
                ?>
 value="<?php 
                echo $pay->id;
                ?>
" name="pays[]" id="payments" />
				<label for="payment_gateway_meta_box_text"><?php 
                echo $pay->title;
                ?>
</label>  
				<br />  
			<?php 
            }
        }
开发者ID:WP-Panda,项目名称:allergenics,代码行数:30,代码来源:wcpgsk-af.php

示例2: explode

                    </tr>

                    <!------------------------------------------------------------------ Payment Mapping Wc_to_Vend---------------------------------------->
                    <tr valign="top">
                        <th  class="titledesc">Payment mapping<a href="https://www.linksync.com/help/woocommerce"><img title="When syncing orders, both Vend and WooCommerce have their own payment methods - use these Payment Mapping settings to 'map' the Vend payment methods with those in your WooCommerce store." style="margin-bottom: -4px;margin-left: 4px;" src="../wp-content/plugins/linksync/img/help.png" height="16" width="16"></a> </th>
                        <td class="forminp forminp-checkbox">
                            <?php 
#Check for the Payment
if (isset($payment) && !empty($payment)) {
    if (!isset($payment['errorCode'])) {
        if (isset($payment['paymentTypes'])) {
            ?>
                                        <?php 
            $payment_wc_to_vend = get_option('wc_to_vend_payment');
            $wc_to_vend_payment = explode(',', $payment_wc_to_vend);
            $payment_gatways = $gatway->payment_gateways();
            ?>
<ul><legend style="display: inline-block;width: 20em; float: left"> <b>WooCommerce Payment Gateways</b></legend>   <legend style="display: inline-block;width: 3em; float: left">=></legend>  <legend style="display: inline-block;width: 25em; "><b>Vend Payment</b></legend><br>
                                        <?php 
            foreach ($payment_gatways as $gatways) {
                if ($gatways->enabled == 'yes') {
                    ?>
 <li> <legend style="display: inline-block;width: 20em; float: left">
                                                        <?php 
                    echo $gatways->title;
                    ?>
</legend>    <legend style="display: inline-block;width: 3em; float: left">=></legend> 
                                                    <legend style="display: inline-block;width: 25em; "><select style="margin-top: -5px" name="wc_to_vend_payment[]">
                                                            <?php 
                    foreach ($payment['paymentTypes'] as $payment_mapping) {
                        if (in_array($payment_mapping['name'] . "%%" . $payment_mapping['id'] . '|' . $gatways->title . '|' . $gatways->id, $wc_to_vend_payment)) {
开发者ID:amanpreet8333,项目名称:linksync,代码行数:31,代码来源:vend_order_config.php


注:本文中的WC_Payment_Gateways::payment_gateways方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。