سلام ممنون از جوابگوییتون من کد رو این جور نوشتم :
<?php
/**
* @package Mail_Plugin
*/
namespace Inc\Api\data;
//use Inc\base\mailconfig;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
require_once ( plugin_basename ( dirname ( __FILE__, 2) . 'vendor/autoload.php' ) );
class ProductCategory
{
// public $sending;
public function __construct()
{
// Hook to woocommerce pdf invoice and packing slip plugin to utilize order_id and pdf document that created by it .
add_action ( 'wpo_wcpdf_pdf_created',