就将数据从Contact Form 7发送到我的php函数而言,我对Contact Form 7中需要做的事情感到困惑。如果我想向php发送值但又不想发送电子邮件,该怎么办?我怎么称呼PHP文件?表单似乎也对邮件部分为空而大惊小怪。
我已经完成了login.php文件,但是由于它位于我的子主题的根目录中,因此不确定如何调用它。
add_action( 'wpcf7_before_send_mail', 'sign_in_client' );
function sign_in_client( $client_login_form)
{
$submission = WPCF7_Submission::get_instance();
// Get the post data and other post meta values.
if ( $submission ) {
$posted_data = $submission->get_posted_data();
// these variables are examples of other things you may want to pass to your custom handler
$user_name = $submission->get_meta( 'client-username' );
$user_password = $submission->get_meta( 'client-password' );