Automattic\WooCommerce\Database\Migrations\CustomOrderTable

PostToOrderAddressTableMigrator::get_where_clause_for_verification()protectedWC 1.0

Helper function to generate where clause for fetching data for verification.

{} Это метод класса: PostToOrderAddressTableMigrator{}

Хуков нет.

Возвращает

Строку. WHERE clause.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_where_clause_for_verification( $source_ids );
$source_ids(массив) (обязательный)
Array of IDs from source table.

Код PostToOrderAddressTableMigrator::get_where_clause_for_verification() WC 6.8.0

protected function get_where_clause_for_verification( $source_ids ) {
	global $wpdb;
	$query = parent::get_where_clause_for_verification( $source_ids );
	// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $query should already be prepared, $schema_config is hardcoded.
	return $wpdb->prepare( "$query AND {$this->schema_config['destination']['table_name']}.address_type = %s", $this->type );
}