We have a tight budget for a new Craft 3 site. How can the paid plugins be filtered from the store, so we can review only the free ones?
1 Answer
I'm afraid you can not. But a bit of PHP and the plugin store's API url shows you the list of plugins of which the first edition is free (or go to this page):
<?php
$perPage = 100;
$page = 1;
$done = false;
while (!$done) {
$url = 'https://api.craftcms.com/v1/plugin-store/plugins?perPage=' . $perPage . '&page=' . $page . '&orderBy=name&direction=asc';
$response = json_decode(file_get_contents($url));
if (isset($response->plugins) && !empty($response->plugins)) {
foreach ($response->plugins as $plugin) {
if ($plugin->editions[0]->price === null) {
echo '<strong>' . $plugin->name . '</strong><br />';
echo $plugin->shortDescription . '<br />';
echo '<a href="https://plugins.craftcms.com/' . $plugin->handle . '" target="_blank">Show me more</a><br /><br />';
}
}
}
if ($response->totalResults <= ($perPage * ($page))) {
$done = true;
}
$page++;
}
-
1
-