تابع ووکامرسی wc_mail ارسال ایمیل به صورت HTML از آدرس داده شده

تابع ووکامرسی wc_mail ارسال ایمیل به صورت HTML از آدرس داده شده

تابع ووکامرسی wc_mail – ارسال ایمیل به صورت HTML از آدرس داده شده

Syntax – سینتکس

wc_mail( (mixed) $to, (mixed) $subject, (mixed) $message, $headers = 'Content-Type: text/html  ', (string) $attachments = '' ); 

Parameters – پارامتر ها (5)

  • 1- $to (mixed)
  • 2- $subject (mixed)
  • 3- $message (mixed)
  • 4- $headers (string)
  • 5- $attachments (string)

Usage – نحوه استفاده

if ( !function_exists( 'wc_mail' ) ) { 
    require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php'; 
} 
  
// The to. 
$to = null; 
  
// The subject. 
$subject = null; 
  
// The message. 
$message = null; 
  
// (default: "Content-Type: text/html\r\n") 
$headers = 'Content-Type: text/html 
 
'; 
  
// The attachments. 
$attachments = ''; 
  
// NOTICE! Understand what this does before running. 
$result = wc_mail($to, $subject, $message, $headers, $attachments); 
    

Defined – محل تعریف

/includes/wc-core-functions.php

function wc_mail( $to, $subject, $message, $headers = "Content-Type: text/html\r\n", $attachments = "" ) { 
    $mailer = WC()->mailer(); 
 
    $mailer->send( $to, $subject, $message, $headers, $attachments ); 
} 

versions – نسخه ها

از نسخه : 3.0.2

نسخه فعلی : 3.0.6

دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2

ارسال نظر

جهت استفاده از کد حتما از تگ pre استفاده نمایید .

contact us