本文整理汇总了PHP中WC_Payment_Gateway::tokenization_enabled方法的典型用法代码示例。如果您正苦于以下问题:PHP WC_Payment_Gateway::tokenization_enabled方法的具体用法?PHP WC_Payment_Gateway::tokenization_enabled怎么用?PHP WC_Payment_Gateway::tokenization_enabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WC_Payment_Gateway
的用法示例。
在下文中一共展示了WC_Payment_Gateway::tokenization_enabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: subscriptions_maybe_edit_renewal_support_status
/**
* Edit the Subscriptions automatic renewal payments support column content
* when a gateway supports subscriptions (via tokenization) but tokenization
* is not enabled
*
* @since 4.1.0
* @param string $html column content
* @param \WC_Payment_Gateway|\SV_WC_Payment_Gateway $gateway payment gateway being checked for support
* @return string html
*/
public function subscriptions_maybe_edit_renewal_support_status($html, $gateway)
{
// only for our gateways
if (!in_array($gateway->id, $this->get_gateway_ids())) {
return $html;
}
if ($gateway->is_enabled() && $gateway->supports_tokenization() && !$gateway->tokenization_enabled()) {
$tool_tip = esc_attr__('You must enable tokenization for this gateway in order to support automatic renewal payments with the WooCommerce Subscriptions extension.', 'woocommerce-plugin-framework');
$status = esc_html__('Inactive', 'woocommerce-plugin-framework');
$html = sprintf('<a href="%1$s"><span class="sv-wc-payment-gateway-renewal-status-inactive tips" data-tip="%2$s">%3$s</span></a>', esc_url(SV_WC_Payment_Gateway_Helper::get_payment_gateway_configuration_url($this->get_gateway_class_name($gateway->get_id()))), $tool_tip, $status);
}
return $html;
}