generate functionMon, 02 Jan 2023

generate woocommerce-checkout-payment fragments html

function wc_get_template_part($slug, $name = '') { $template = ''; // Look in yourtheme/slug-name.php and yourtheme/woocommerce/slug-name.php if ($name) $template = locate_template(array("{$slug}-{$name}.php", WC()->template_path() . "{$slug}-{$name}.php")); // Get default slug-name.php if (!$template && $name && file_exists(WC()->plugin_path() . "/templates/{$slug}-{$name}.php")) $template = WC()->plugin_path() . "/templates/{$slug}-{$name}.php"; // If template file doesn't exist, look in yourtheme/slug.php and yourtheme/woocommerce/slug.php if (!$template) $template = locate_template(array("{$slug}.php", WC()->template_path() . "{$

Questions about programming?Chat with your personal AI assistant