Automattic\WooCommerce\Internal\Admin
OrderTaxLookupMigrator::get_pending_rows_sql
SQL matching the lookup rows the rebuild would rewrite, each pass from its own cursor.
Method of the class: OrderTaxLookupMigrator{}
No Hooks.
Returns
array. array('where'=> string,'values'=> int[] ), the values in placeholder order.
Usage
// private - for code of main (parent) class only $result = $this->get_pending_rows_sql(): array;
OrderTaxLookupMigrator::get_pending_rows_sql() OrderTaxLookupMigrator::get pending rows sql code WC 11.3.0
private function get_pending_rows_sql(): array {
$clauses = array();
$values = array();
foreach ( $this->get_pending_passes() as $pass ) {
$clauses[] = "( order_id > %d AND ( {$pass['condition']} ) )";
$values[] = $this->get_cursor( $pass['cursor'] );
}
return array(
'where' => '( ' . implode( ' OR ', $clauses ) . ' )',
'values' => $values,
);
}