Created
December 27, 2021 15:40
-
-
Save dejanmarkovic/56801b009e9325037ebae41132c64ff0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$woocommerce = new Client( | |
$wmpapi_site_url, | |
$wmpapi_consumer_key, | |
$wmpapi_consumer_secret, | |
[ | |
'wp_api' => true, | |
'version' => 'wc/v3', | |
//'timeout' => 400 | |
//'query_string_auth' => false, | |
] | |
); | |
//iporting product | |
error_log( 'IMPORT PRODUCT 1 START ' . '[' . date( "F j, Y, g:i a H:i:s" ) . ']' ); | |
$results = $wc_api_client->post( 'products', $data[0] ); //5 - 7 seconds | |
error_log( 'IMPORT PRODUCT 1 END ' . '[' . date( "F j, Y, g:i a H:i:s" ) . ']' ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment