Automattic\WooCommerce\Internal\CLI\Migrator\Lib

ImportSession::count_awaiting_frontloading_stubspublicWC 1.0

Method of the class: ImportSession{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

ImportSession::count_awaiting_frontloading_stubs() code WC 10.7.0

public function count_awaiting_frontloading_stubs() {
	global $wpdb;

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