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
require_once 'lib/woocommerce-api.php'; | |
$consumer_key = 'ck_b19dd8998398a762d0a5062e9fd1cef1c38bdcf1'; | |
$consumer_secret = 'cs_12bb4182989d216d02a773586d680d481caef086'; | |
$store_url = 'http://shop.lifespa.com/'; | |
$options = array( | |
'debug' => true, | |
'return_as_array' => true, | |
'validate_url' => false, | |
'timeout' => 30, |
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
Array | |
( | |
[orders] => Array | |
( | |
[0] => Array | |
( | |
[id] => 3520 | |
[order_number] => 3520 | |
[created_at] => 2016-09-01T20:37:12Z | |
[updated_at] => 2016-09-01T20:37:12Z |
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
// Add VAT and SSN fields in billing address display | |
add_filter( 'woocommerce_order_formatted_billing_address', 'custom_add_vat_ssn_formatted_billing_address', 10, 2 ); | |
function custom_add_vat_ssn_formatted_billing_address( $fields, $order ) { | |
$fields['vat'] = $order->billing_vat; | |
$fields['ssn'] = $order->billing_ssn; | |
return $fields; | |
} | |
add_filter( 'woocommerce_my_account_my_address_formatted_address', 'custom_my_account_my_address_formatted_address', 10, 3 ); |
OlderNewer