Migration fix + removed model instantiation in Listing handler

This commit is contained in:
Jonathan Labreuille
2015-09-03 11:14:38 +02:00
parent 1698066f2b
commit a40cdcb20c
5 changed files with 16 additions and 14 deletions

View File

@@ -10,7 +10,10 @@ class Subscribers {
}
function get($data = array()) {
$listing = new Listing\Handler('Subscriber', $data);
$listing = new Listing\Handler(
\Model::factory('\MailPoet\Models\Subscriber'),
$data
);
wp_send_json($listing->get());
}