Skip to content

Instantly share code, notes, and snippets.

@bolderelements
Created November 30, 2022 21:29
Show Gist options
  • Save bolderelements/1aa9eb275e8e9894589aef2336b175da to your computer and use it in GitHub Desktop.
Save bolderelements/1aa9eb275e8e9894589aef2336b175da to your computer and use it in GitHub Desktop.
Add <embed> tag to the allowed list for the Table Rate Shipping description field
/*
* Adds the <embed> 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['embed'] = array(
'src' => true,
'type' => true,
'allowfullscreen' => true,
'allowscriptaccess' => true,
'height' => true,
'width' => true
);
return $allowedtags;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment