Question

I'm creating a list table in WordPress and I want to fetch the cancelled orders, but I want to fetch all, not for tens.

This is my code:

$pedidos = $wc_api -> get_orders( array( 'status' => 'cancelled'), 'filter[limit]' => 100000 );

I'm trying to set a big number (following MySQL limit theory) as the parameter for filter to fetch all the rows, but this doesn't work.

Is this actually possible?

No correct solution

OTHER TIPS

I got it!

The problem was caused because recently I changed the taxonomy for all the products and some products related with cancelled orders do not update their name. So when the API call looked for the name of a product inside a cancelled order do not found it and returns an error.

Simply I deleted all the cancelled orders with old product names and all works perfectly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top