PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Hooks/CLI/Commands.php +32 -2 1.3.23 → 1.6.5 View file →
@@ -455,9 +455,9 @@
455 455 'shipping_last_name' => $lastName,
456 456 'billing_address_1' => $faker->streetName(),
457 457 'billing_address_2' => '',
458 458 'billing_city' => $faker->city(),
459 - 'billing_state' => $faker->state,
459 + 'billing_state' => $faker->state(),
460 460 'billing_zip' => $faker->postcode,
461 461 'billing_country' => $faker->countryCode(),
462 462 'ip_address' => $faker->ipv4,
463 463 'phone' => $faker->phoneNumber,
@@ -519,8 +519,11 @@
519 519 }
520 520
521 521 delete_option('fluent_cart_plugin_once_activated');
522 522 delete_option('fluent_cart_store_settings');
523 + delete_option('fluent_cart_tax_configuration_settings');
524 + delete_option('fluent_cart_has_tax_configure');
525 + \FluentCart\Api\StoreSettings::clearCache();
523 526
524 527 delete_option('__fluent_cart_edd2_migration_steps');
525 528 delete_option('_fluent_edd_failed_payment_logs');
526 529
@@ -1439,9 +1442,9 @@
1439 1442 $customer->last_name = $faker->lastName;
1440 1443 $customer->email = $faker->safeEmail;
1441 1444 $customer->phone = $faker->phoneNumber;
1442 1445 $customer->city = $faker->city;
1443 - $customer->state = $faker->state;
1446 + $customer->state = $faker->state();
1444 1447 $customer->postcode = $faker->postcode;
1445 1448 $customer->country = $faker->countryCode;
1446 1449
1447 1450 $item1 = new \FluentCart\App\Models\OrderItem();
@@ -1492,8 +1495,35 @@
1492 1495 'order' => $order,
1493 1496 'customer' => $customer,
1494 1497 'transaction' => $transaction,
1495 1498 ];
1499 + }
1500 +
1501 + public function reset_tax($args, $assoc_args)
1502 + {
1503 + $this->authorize();
1504 +
1505 + delete_option('fluent_cart_tax_configuration_settings');
1506 + delete_option('fluent_cart_has_tax_configure');
1507 +
1508 + $db = fluentCart('db');
1509 +
1510 + $db->table('fct_meta')
1511 + ->whereIn('object_type', ['tax', 'eu_vat_registration', 'tax_override'])
1512 + ->delete();
1513 +
1514 + $db->table('fct_tax_rates')->delete();
1515 + $db->table('fct_tax_classes')->delete();
1516 +
1517 + $now = gmdate('Y-m-d H:i:s');
1518 + $db->table('fct_tax_classes')->insert([
1519 + 'title' => 'Standard',
1520 + 'slug' => 'standard',
1521 + 'created_at' => $now,
1522 + 'updated_at' => $now,
1523 + ]);
1524 +
1525 + \WP_CLI::success('Tax configuration has been fully reset. Visit the Tax settings page to reconfigure.');
1496 1526 }
1497 1527
1498 1528 public function sync_stripe_renwals($args, $assoc_args)
1499 1529 {