开源软件名称(OpenSource Name):kloon/WooCommerce-REST-API-Client-Library开源软件地址(OpenSource Url):https://github.com/kloon/WooCommerce-REST-API-Client-Library开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):WooCommerce REST API PHP Client LibraryAboutA PHP wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API using this library. Feedback and bug reports are appreciated. RequirementsPHP 5.2.x cURL WooCommerce 2.2 at least on the store Getting startedGenerate API credentials (Consumer Key & Consumer Secret) under WP Admin > Your Profile. Setup the libraryrequire_once( 'lib/woocommerce-api.php' );
$options = array(
'ssl_verify' => false,
);
try {
$client = new WC_API_Client( 'http://your-store-url.com', $consumer_key, $consumer_secret, $options );
} catch ( WC_API_Client_Exception $e ) {
echo $e->getMessage() . PHP_EOL;
echo $e->getCode() . PHP_EOL;
if ( $e instanceof WC_API_Client_HTTP_Exception ) {
print_r( $e->get_request() );
print_r( $e->get_response() );
}
} Options
Error handlingExceptions are thrown when errors are encountered, most will be instances of MethodsIndex
Orders
CreditCopyright (c) 2013-2014 - Gerhard Potgieter, Max Rice and other contributors LicenseReleased under the GPL3 license |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论