"Card", // "plain" => "Plain" // ]; /** * * the Brands supported by the gateway * @var array $supported_brands */ protected $supported_brands = [ "' . strtoupper($first_upper) . '" => "' . $first_upper . '", ]; public function __construct() { parent::__construct(); } /** * to set extra parameter on requested data to connector * just uncomment the function below * * @param object $order * @return array */ // public function setExtraData(WC_Order $order) : array // { // return [ // "headers" => [ // "header extra option" => "value" // ], // "body" => [ // "extra param name " => "value" // ] // ]; // } } '; fwrite($myfile, $txt); fclose($myfile); $new = "// Add Class Here 'WC_Hyperpay_" . $first_upper . "_Gateway',"; $file = str_replace('// Add Class Here', $new, $filecontent); file_put_contents("includes\\class-install.php", $file); echo "\033[32m WC_Hyperpay_" . $first_upper . "_Gateway created \u{221a} \033[0m\n"; echo "\033[32m Done .... \u{221a} \033[0m\n";