Open app/setup.php, find the after_setup_theme action and put add_theme_support('woocommerce'); inside the function.
Add the templates you want to override in resources/woocommerce:
theme
│
| <?php | |
| namespace App\Livewire\Attributes; | |
| use Attribute; | |
| use Livewire\Features\SupportAttributes\Attribute as LivewireAttribute; | |
| use function Livewire\store; | |
| #[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] |
| <?php | |
| function memoize($target) { | |
| static $memo = new WeakMap; | |
| return new class ($target, $memo) { | |
| function __construct( | |
| protected $target, | |
| protected &$memo, | |
| ) {} |
| const fs = require("fs"); | |
| if (!fs.existsSync("package.json")) { | |
| console.error( | |
| "Cannot find package.json. Please run this script in your project directory." | |
| ); | |
| process.exit(1); | |
| } | |
| const package = fs.readFileSync("package.json", "utf8"); |
| <div x-data="setupEditor(@entangle($attributes->wire('model')).defer)" x-init="() => init($refs.editor)" wire:ignore | |
| {{ $attributes->whereDoesntStartWith('wire:model')->merge(['class' => 'editor !w-full !max-w-full']) }}> | |
| <template x-if="editor"> | |
| <div class="flex space-x-4 items-center dark:text-neutral-100 fill-current py-2"> | |
| <button @click.prevent="Alpine.raw(editor).chain().toggleBold().focus().run()"> | |
| <x-icon-bold class="w-4 h-4" /> | |
| </button> | |
| <button @click.prevent="Alpine.raw(editor).chain().toggleItalic().focus().run()"> | |
| <x-icon-italic class="w-4 h-4" /> | |
| </button> |