Open
Description
Hi, first of all, thank you for your work!
i guess it would be very nice to have the ability to set config as arguments to the WoocommerceApi
Class, bypassing the static config file, this would help in case of batch calling on multiple endpoints, i know you can use the builtin config([])
function but in my test it does not work if i run a loop through php artisan command
example code:
foreach(['A', 'B', 'C'] as $endpoint){
config(['woocommerce.store_url' => '...']);
config(['woocommerce.consumer_key' => '...']);
config(['woocommerce.consumer_secret' => '...']);
$orders = WooCommerce::all('orders', ...);
// $orders will output the same results for every endpoint,
// because the config changes only for the first endpoint
}
hope this make sense! ;-)
Metadata
Metadata
Assignees
Labels
No labels