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
//Disabiilitare tutti gli aggiornamenti | |
define( 'WP_AUTO_UPDATE_CORE', false ); | |
//Disabiilitare aggiornamenti plugin automatici | |
add_filter( 'auto_update_plugin', '__return_false' ); | |
//Disabiilitare aggiornamenti temi automatici | |
add_filter( 'auto_update_theme', '__return_false' ); |
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_action( 'woocommerce_before_cart', 'apply_matched_coupons' ); function apply_matched_coupons() { global $woocommerce; $coupon_code = '10percento'; // titolo del coupon if ( $woocommerce->cart->has_discount( $coupon_code ) ) return; if ( $woocommerce->cart->cart_contents_total >= 500 ) { // valore minimo del carrello $woocommerce->cart->add_discount( $coupon_code ); $woocommerce->show_messages(); } } |
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
function check($product_id) { | |
global $woocommerce; | |
foreach($woocommerce->cart->get_cart() as $key => $val ) { | |
$_product = $val['data']; | |
if($product_id == $_product->id ) { | |
return true; | |
} | |
} |
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
<?php | |
/** | |
* Cart Page | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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
function remove_menus(){ | |
remove_menu_page( 'vc-welcome' ); | |
} | |
add_action( 'admin_menu', 'remove_menus' ); |
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
<td class="td" style="text-align:left; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" valign="top" width="50%"> | |
<h3><?php _e( 'Billing address', 'woocommerce' ); ?></h3> | |
<p class="text"><?php echo $order->get_formatted_billing_address(); ?></p> | |
</td> |
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 table.cart td.actions .coupon { | |
width: 50%; | |
} | |
#page .coupon #coupon_code { | |
width: auto; | |
float: left; | |
} | |
#page .coupon input.button { | |
float: left; | |
} |
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_filter( 'gettext', 'text_paypal_chechout', 20, 3 ); | |
function text_paypal_chechout( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Procedi a PayPal' : | |
$translated_text = __( 'ACQUISTA ORA', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} |