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


PHP WC_Payment_Gateway::get_order_total方法代码示例

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


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

示例1: payment_fields

            public function payment_fields()
            {
                global $woocommerce;
                if (!$GLOBALS['paymill_active']) {
                    paymill_load_frontend_scripts();
                    // load frontend scripts
                    // settings
                    $GLOBALS['paymill_active'] = true;
                    $cart_total = WC_Payment_Gateway::get_order_total() * 100;
                    $currency = get_woocommerce_currency();
                    $no_logos = true;
                    // form ids
                    echo '<script>
						paymill_form_checkout_id = "form.checkout, form#order_review";
						paymill_form_checkout_submit_id = "#place_order";
						paymill_shop_name = "woocommerce";
						paymill_pcidss3 = ' . (empty($GLOBALS['paymill_settings']->paymill_general_settings['pci_dss_3']) || $GLOBALS['paymill_settings']->paymill_general_settings['pci_dss_3'] != '1' ? 1 : 0) . ';
						paymill_pcidss3_lang = "' . substr(apply_filters('plugin_locale', get_locale(), $domain), 0, 2) . '";
						</script>';
                    echo '<a href="https://www.paymill.com/" target="_blank"><img src="' . WC_HTTPS::force_https_url($this->logo_small) . '" alt="' . $this->title . '" /></a>';
                    echo '<p class="paymill_payment_description">' . $this->settings['description'] . '</p>';
                    require_once PAYMILL_DIR . 'lib/tpl/checkout_form.php';
                } else {
                    echo '<div class="paymill_notification paymill_notification_once_only"><strong>Error:</strong> Paymill can be loaded once only on the same page.</div>';
                }
                return true;
            }
开发者ID:cyrrill,项目名称:paymill-wordpress,代码行数:27,代码来源:woocommerce.inc.php


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