Skip to content

Instantly share code, notes, and snippets.

@claudiosanches
Last active February 23, 2018 19:58
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
WooCommerce 2.4 - Example of how generate an URL for the API Auth endpoint
<?php
$store_url = 'http://example.com';
$endpoint = '/wc-auth/v1/authorize';
$params = array(
'app_name' => 'My App Name',
'scope' => 'write',
'user_id' => 123,
'return_url' => 'http://app.com',
'callback_url' => 'https://app.com'
);
echo $store_url . $endpoint . '?' . http_build_query( $params );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment