我试着让它用这个测试脚本给我发电子邮件,这个测试脚本在浏览器上自己运行时是有效的。我只是不能让它在二十二主题的functions.php中触发。我预计它会在我的帐户中的支付方式中增加一张新卡后立即触发?
add_action( 'after_woocommerce_add_payment_method', ‘changesubscriptionpd’ );
function changesubscriptionpd() {
include ‘https://demourl.com/wp-content/themes/twentytwentytwo/mailtest.php’;