本文整理汇总了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;
}