How can I fix the pages pager returns?
I would add this as a comment if I could. Looking at your code, it looks like you're only adding rows to $rows is $part['wtcr_sku'] is an empty string (line 258). It's possible you could be filtering out rows because of that.