Created
May 5, 2014 17:30
-
-
Save maxrice/3acf9676951537c04052 to your computer and use it in GitHub Desktop.
WooCommerce Customer/Order CSV Export - Add HTTP Basic Auth to HTTP POST export
This file contains hidden or 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
<?php | |
function wc_csv_export_add_http_post_basic_auth( $args ) { | |
// you can set other HTTP headers using the format $args['headers']['Header Name'] = 'header value' | |
$args['headers']['Authorization'] = 'Basic ' . base64_encode( 'your_username:your_password' ); | |
return $args; | |
} | |
add_filter( 'wc_customer_order_csv_export_http_post_args', 'wc_csv_export_add_http_post_basic_auth' ); |
hey @setjo1980 unfortunately there are no notifications for gist comments, sorry for the delay here.
Not familiar enough with webDAV to know if you could use HTTP POST instead of FTP, but that might be the best option to start with. This would require customization, and while support is included with each purchase, plugin customizations are not. We typically recommend Codeable for these projects. Cheers!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have recently purchased Order/Customer CSV Export addon
I want to export csv directly to the extranet at: http://corp.gourmetsolution.com:6081/clients/nativo/ under the folder “Orders Upload”The folder supports WebDAV but not FTP
And this extranet url requires Username and password
Can this be done thru the above code
If yes pls let me know how to do this, where to add the code?
Guide me thru all steps