Automattic\WooCommerce\Internal\CLI\Migrator\Lib

ImportSession::get_total_number_of_assetspublicWC 1.0

Method of the class: ImportSession{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ImportSession = new ImportSession();
$ImportSession->get_total_number_of_assets();

ImportSession::get_total_number_of_assets() code WC 10.7.0

public function get_total_number_of_assets() {
	global $wpdb;

	return (int) $wpdb->get_var(
		$wpdb->prepare(
			"SELECT COUNT(*) FROM $wpdb->posts
		WHERE post_type = 'frontloading_stub'
		AND post_parent = %d",
			$this->post_id
		)
	);
}