Skip to content

Instantly share code, notes, and snippets.

View hvsombrilla's full-sized avatar
🏠
Working from home

HV Sombrilla hvsombrilla

🏠
Working from home
View GitHub Profile
@hvsombrilla
hvsombrilla / soap.php
Created May 27, 2021 13:35
Codigo Soap
<?php
$cliente = new SoapClient('http://30.10.99.50:81/WsConsumeQuote/Vehicle.asmx?wsdl', array("trace" => 1, "exception" => 1));
$header = new SoapHeader('http://tempuri.org/', 'Login',[
'User' => 'int13991',
'Password' => '#######'
]);
$cliente->__setSoapHeaders($header);
@hvsombrilla
hvsombrilla / functions.php
Created October 4, 2018 15:55
Redirect to External URL in External Products - Woocommerce
<?php
function redirectExternalProduct()
{
if (is_single() AND !empty(get_post_meta(get_the_ID(), '_product_url'))) {
wp_redirect(get_post_meta(get_the_ID(), '_product_url', true));
exit;
}
}