PHP code example of producttrap / driver-woolworths-australia

1. Go to this page and download the library: Download producttrap/driver-woolworths-australia library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

producttrap / driver-woolworths-australia example snippets


use ProductTrap\ProductTrap;

/** @var ProductTrap $productTrap */
$woolworths = $productTrap->driver('woolworths_australia');

$details = $woolworths->find('ABC123');
echo $details->unitPrice->label(); // $24.56 / 1KG