WordPress at Your Fingertips
function is not described

WC_CLI_Tracker_Command::show_tracker_snapshot() public WC 1.0

Dump tracker snapshot data to screen.

EXAMPLES

wp wc tracker snapshot --format=yaml wp wc tracker snapshot --format=json

OPTIONS

[--format=<format>]
Render output in a particular format, see WP_CLI\Formatter for details.

{} It's a method of the class: WC_CLI_Tracker_Command{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_CLI_Tracker_Command::show_tracker_snapshot( $args, $assoc_args );
$args(array) (required)
WP-CLI positional arguments.
$assoc_args(array) (required)
WP-CLI associative arguments.

Notes

Code of WC_CLI_Tracker_Command::show_tracker_snapshot() WC 5.9.0

public static function show_tracker_snapshot( $args, $assoc_args ) {
	$snapshot_data = WC_Tracker::get_tracking_data();

	$formatter = new \WP_CLI\Formatter(
		$assoc_args,
		array_keys( $snapshot_data )
	);

	$formatter->display_items( array( $snapshot_data ) );
}