/** * 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; }