I hereby claim:
- I am alexminza on github.
- I am alexminza (https://keybase.io/alexminza) on keybase.
- I have a public key whose fingerprint is 4141 875C EAF5 42FF E633 4CB1 3EA4 3664 4C4F 5C80
To claim this, I am signing this object:
if(empty($atts)) { | |
return ''; | |
} | |
$slug = $atts['slug']; | |
$taxonomy = $atts['taxonomy']; | |
$term_link = get_term_link($slug, $taxonomy); | |
if(is_wp_error($term_link)) { |
add_filter('woocommerce_get_country_locale', 'woocommerce_get_country_locale_romania'); | |
function woocommerce_get_country_locale_romania($countries) { | |
//https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-countries.php | |
$countries['RO']['state']['required'] = true; | |
} |
//https://stackoverflow.com/questions/30539549/woocommerce-product-link-url-for-simple-products | |
if(empty($atts)) { | |
return ''; | |
} | |
if(isset($atts['id'])) { | |
$product_data = get_post($atts['id']); | |
} elseif(isset($atts['sku'])) { | |
$product_id = wc_get_product_id_by_sku($atts['sku']); |
//https://codex.wordpress.org/Function_Reference/shortcode_atts | |
$args = shortcode_atts( | |
array( | |
'option' => '', | |
'default' => '', | |
), $atts, 'get_option'); | |
//https://developer.wordpress.org/reference/functions/get_option/ | |
return get_option($args['option'], $args['default']); |
I hereby claim:
To claim this, I am signing this object: