Skip to content

Fatal error: Uncaught WC_Data_exception #162

@BusinessBloomer

Description

@BusinessBloomer

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

Tried to create 10 orders via CLI and got this:

Fatal error: Uncaught WC_Data_Exception: <strong>First name</strong> is a required field. in /var/---------/wordpress/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php:116
Stack trace:
#0 /var/-----/wordpress/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(186): WC_Customer_Data_Store->create()
#1 /var/-----/wordpress/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php(241): WC_Data_Store->create()
#2 /var/-----/wordpress/wp-content/plugins/wc-smooth-generator/includes/Generator/Customer.php(115): WC_Data->save()
#3 /var/-----/wordpress/wp-content/plugins/wc-smooth-generator/includes/Generator/Order.php(179): WC\SmoothGenerator\Generator\Customer::generate()
#4 /var/-----/wordpress/wp-content/plugins/wc-smooth-generator/includes/Generator/Order.php(31): WC\SmoothGenerator\Generator\Order::get_customer()
#5 /var/-----/wordpress/wp-content/plugins/wc-smooth-generator/includes/Generator/Order.php(153): WC\SmoothGenerator\Generator\Order::generate()
#6 /var/------/wordpress/wp-content/plugins/wc-smooth-generator/includes/CLI.php(104): WC\SmoothGenerator\Generator\Order::batch()
#7 [internal function]: WC\SmoothGenerator\CLI::orders()
#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func()
#9 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}()
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(497): call_user_func()
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(441): WP_CLI\Dispatcher\Subcommand->invoke()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(464): WP_CLI\Runner->run_command()
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1296): WP_CLI\Runner->run_command_and_exit()
#14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process()
#16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#17 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#18 /usr/local/bin/wp(4): include('...')
#19 {main}
  thrown in /var/-----/wordpress/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php on line 116

WordPress Environment

No response

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce and WooCommerce Smooth Generator plugins are active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions