Skip to content

Instantly share code, notes, and snippets.

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

RwkY rwkyyy

🏠
Working from home
View GitHub Profile
@rwkyyy
rwkyyy / Popup Maker - at 3 pages popup
Last active June 4, 2016 19:19 — forked from anonymous/Popup Maker - at 3 pages popup
Simle jQuery to show a popup at 3rd page of a visitor - Wordpress Popup Maker
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) {
@rwkyyy
rwkyyy / woocommerce-duplicate-skus.sql
Last active May 6, 2019 12:40 — forked from yanknudtskov/woocommerce-duplicate-skus.sql
Select Duplicate SKUs from WooCommerce Database #woocommerce #mysql
SELECT meta_value
FROM wprh_postmeta
WHERE meta_key = '_sku'
AND meta_value != ''
GROUP BY meta_value HAVING COUNT(meta_value) > 1
@rwkyyy
rwkyyy / function.php
Last active July 14, 2020 08:55 — forked from xadapter/functoin.php
remove shipping methods based on city
// 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'),
);
@rwkyyy
rwkyyy / wc-display-product-attribute-archive-links.php
Last active September 23, 2020 10:19 — forked from woogists/wc-display-product-attribute-archive-links.php
[General Snippets] Display product attribute in single product page with links