Skip to content

Instantly share code, notes, and snippets.

@bolderelements
bolderelements / betrs-add-img-tag-desc.php
Last active May 29, 2018 15:02
Add IMG to Allowed Description Tags
/*
* Adds the <img> tag to allowed tags in the Description field.
*
* Requires Table Rate Shipping for WooCommerce 4.2+
*/
add_filter( 'betrs_desc_allowed_tags', 'add_new_allowed_tags_betrs', 10, 1 );
function add_new_allowed_tags_betrs( $allowedtags ) {
$allowedtags['img'] = array(
'alt' => true,
@dingo-d
dingo-d / simple-vies-check.php
Created October 20, 2016 07:32
AJAX function for checking the VAT number based on country and VAT id
<?php
add_action( 'wp_ajax_simple_vies_check', 'simple_vies_check' );
add_action( 'wp_ajax_nopriv_simple_vies_check', 'simple_vies_check' );
if ( ! function_exists( 'simple_vies_check' ) ) {
/**
* AJAX VIES check function for WooCommerce checkout
*
* @since 1.0.0