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 rwk_redirect_b2b() { | |
if ( | |
! is_user_logged_in() | |
&& (is_woocommerce() || is_cart() || is_checkout()) | |
) { | |
// feel free to customize the following line | |
wp_redirect( site_url('autentificare/') ) | |
exit; | |
} | |
} |
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 customer email to Cancelled Order recipient list | |
*/ | |
function wc_cancelled_order_add_customer_email( $recipient, $order ){ | |
return $recipient . ',' . $order->billing_email; | |
} | |
add_filter( 'woocommerce_email_recipient_cancelled_order', 'wc_cancelled_order_add_customer_email', 10, 2 ); |
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 add_after_product_title_rwk() {?> | |
<p class="small"><?php echo 'hello world'; ?></p> | |
<?php } | |
add_action( 'woocommerce_single_product_summary', 'add_after_product_title_rwk', 6 ); |
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_after_shop_loop_item_title', 'loc_show_free_shipping_badge' ); | |
function loc_show_free_shipping_badge() { | |
global $post, $product; | |
if ( $product && $product->get_price() >= 100 ) { | |
echo '<span class="free-shipping">' . __( 'Livrare Gratuită!' ) . '</span>'; | |
} | |
} |
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 | |
/** | |
* Plugin Name: EVD - Card Discount Rules | |
* Plugin URI: https://rwky.ro | |
* Description: Discount rules for cart | |
* Version: 1.0 | |
* Author: Eduard Vasile Doloc | |
* Author URI: http://rwky.ro | |
* Developer: Eduard Vasile Doloc | |
* Developer URI: http://rwky.ro |
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
jQuery(document).ready(function ($) { | |
{ | |
var visited = Cookies.get('visited'); | |
if (visited == undefined) { | |
Cookies.set('visited', 0, {path: '/'}); | |
} | |
else if (visited < 2) { | |
Cookies.set('visited', ++visited, {path: '/'}); | |
} | |
else if (visited == 2) { |
NewerOlder