有没有人比我更了解WooCommerce?我正在寻找一种方式/功能,可以通过WooCommerce以编程方式在PHP文件中仅用来自用户的电子邮件来汇款。我认为这是一个伪代码,应该如何工作:
function sendMoney($user_email) {
global $woocommerce;
$sendMoney = $woocommerce->sendMoney($user_email);
if ($sendMoney == 'successfull') {
echo 'Sending money to test@test.de was successfull!'
} else {
error_log('Sending money was not successfull!');
}
}
我不想破坏WooCommerce系统,但是在WooCommerce设置中,我已经设置了我的PayPal帐户,因此这应该是钱的发送者。听起来很简单,但我不确定是否是这样。
谢谢!