Skip to content

Commit 83d4616

Browse files
Change taxonomy import to make importing taxonomies/terms optional (#89)
Co-authored-by: Jason Varga <[email protected]> Fixes #81
1 parent c59235b commit 83d4616

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Commands/ImportTaxonomies.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ private function useDefaultRepositories()
6262

6363
private function importTaxonomies()
6464
{
65+
if (! $this->confirm('Do you want to import taxonomies?')) {
66+
return;
67+
}
68+
6569
$taxonomies = TaxonomyFacade::all();
6670

6771
$this->withProgressBar($taxonomies, function ($taxonomy) {
@@ -78,6 +82,10 @@ private function importTaxonomies()
7882

7983
private function importTerms()
8084
{
85+
if (! $this->confirm('Do you want to import terms?')) {
86+
return;
87+
}
88+
8189
$terms = TermFacade::all();
8290
// Grab unique parent terms.
8391
$terms = $terms->map->term()->unique();

0 commit comments

Comments
 (0)