Hi everyone!
Function wire() doesn't work in PW3 api after including pw's index.php
Trying to use it exactly the same I use it in pw2 api.
<?php
require_once('/path/to/pw/index.php');
$test = wire('pages')->find('parent_id=1019');
I'm getting an error: PHP Fatal error: Call to undefined function wire()
Though https://processwire.com/api/include/ says I can use wire() function as before.
Btw, this one works:
$wire->pages->find('parent_id=1019');
But I want my old scripts work with wire() function in pw3.
Any ideas what could be wrong?