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
function ds_checkout_analytics( $order_id ) { | |
$order = new WC_Order( $order_id ); | |
$currency = $order->get_order_currency(); | |
$total = $order->get_total(); | |
$date = $order->order_date; | |
?> | |
<!-- Event snippet for Compra conversion page --> | |
<script> | |
gtag('event', 'conversion', { | |
'send_to': 'AW-722612023/4YpRCLTQsKcBELfeyNgC', |
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
add_filter( 'woocommerce_currency_symbol', 'change_currency_symbol', 10, 2 ); | |
function change_currency_symbol( $symbols, $currency ) { | |
if ( 'USD' === $currency ) { | |
return 'USD'; | |
} | |
if ( 'EUR' === $currency ) { | |
return 'Euro'; | |
} |
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
INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10'); |
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
// This on functions.php // | |
function add_query_vars_filter( $vars ){ | |
$vars[] = "ref"; | |
return $vars; | |
} | |
// | |
// Custom template // |
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
// | |
add_action( 'woocommerce_product_meta_start', 'conejito_envio' ); | |
function conejito_envio() { | |
if ( has_term( 'tapetes','product_cat' ) ) { | |
echo '<b>Costo de Envío: $180 MXN.</b>','<br/><br/>'; | |
} | |
elseif ( has_term( 'teepees', 'product_cat' ) ) { |
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
/* (320x480) iPhone (Original, 3G, 3GS) */ | |
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
/* insert styles here */ | |
} | |
/* (320x480) Smartphone, Portrait */ | |
@media only screen and (device-width: 320px) and (orientation: portrait) { | |
/* insert styles here */ | |
} | |
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
add_action( 'woocommerce_before_add_to_cart_quantity', 'valenti_echo_qty_front_add_cart' ); | |
function valenti_echo_qty_front_add_cart() { | |
echo '<div class="qty">Cantidad: </div>'; | |
} | |
/** ADD THIS TO STYLE.CSS **/ | |
div.qty { | |
float: left; |
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
// Custom Admin footer | |
function wpexplorer_remove_footer_admin () { | |
echo '<span id="footer-thankyou">Built with love by <a href="http://www.wpexplorer.com/" target="_blank">WPExplorer</a></span>'; | |
} | |
add_filter( 'admin_footer_text', 'wpexplorer_remove_footer_admin' ); |
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
//Condicional para mostrar boton y video de acuerdo a la categoria (camisas o trajes) | |
//$nombreCategoria = $terms[0]->name; | |
$nombreCategoria = ''; | |
$buttonTalla = ''; | |
foreach($terms as $clave=>$valor){ | |
//Asi obtenemos el nombre de la categoria | |
//echo $valor->name; | |
if($valor->name == 'Camisas'){ | |
$buttonTalla = '<div class="box"><a class="button" href="#popup1">Esto es una camisa</a></div>'; | |
} |
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
/* Despliega el banner de acuerdo a la categoria */ | |
$getUrlCurrent = $_SERVER['QUERY_STRING']; | |
$cateogoria = explode("=", $getUrlCurrent); | |
if( !empty($cateogoria[1]) ){ | |
switch ($cateogoria[1]) { | |
case 'trajes': | |
$bannerCategory = 'http://valenti.epya.host/wp-content/uploads/2018/10/trajes.jpg'; | |
break; | |
case 'sacos': |
NewerOlder