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
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) { |
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
SELECT meta_value | |
FROM wprh_postmeta | |
WHERE meta_key = '_sku' | |
AND meta_value != '' | |
GROUP BY meta_value HAVING COUNT(meta_value) > 1 |
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
// tweak for city shipping options | |
add_filter('woocommerce_package_rates', 'restrict_shipping_options_based_on_city', 10, 2); | |
function restrict_shipping_options_based_on_city($available_shipping_methods, $package){ | |
global $woocommerce; | |
// Config this array with city names and corresponding shipping methods to hide. | |
$country_list = array( | |
'Cefa' => array('flat_rate','free_shipping'), | |
); | |
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_single_product_summary', 'wc_show_attribute_links', 25 ); | |
// if you'd like to show it on archive page, replace "woocommerce_product_meta_end" with "woocommerce_shop_loop_item_title" | |
function wc_show_attribute_links() { | |
global $post; | |
$attribute_names = array( | |
'pa_###', | |
'pa_###' | |
); // Add attribute names here and remember to add the pa_ prefix to the attribute name |