WP Simple Pay 文档

WP Simple Pay 的文档、参考资料和教程

如何自定义付款方式的外观

本文档仅适用于 新支付体验

为提供最高级别的安全性,用于收集敏感支付信息的表单字段均未直接加载到您的网站上。而是将一个 <iframe> 嵌入页面,其内容直接从 Stripe 的服务器加载。

这对于安全性来说非常棒,但它阻止了标准的 CSS 应用于表单元素(CSS 不适用于 iframe)。为了自定义支付方式元素的外观,可以使用 Elements 外观 API

要修改 Elements 配置,可以使用以下过滤器:

<?php
/**
 * Plugin Name: WP Simple Pay - Custom Elements Appearance
 */
add_filter(
	'simpay_elements_config',
	function( $elements ) {
		// Increase the base font size of the tabs to scale the icons.
		$elements['appearance']['rules']['.Tab']['fontSize'] = '24px';

		// Set the font size of the tab label to "reset" the font size.
		$elements['appearance']['rules']['.TabLabel']['fontSize'] = '15px';

		return $elements;
	}
);

以上示例增加了支付方式图标的大小:

了解如何应用自定义代码片段 →

仍有疑问?我们随时为您服务!

最后修改时间:

立即开始接受付款

在您的WordPress网站上开始接受一次性付款、定期付款或捐赠。