Skip to content

Instantly share code, notes, and snippets.

@Auke1810
Created February 13, 2019 22:29
Show Gist options
  • Save Auke1810/202a0a96614f5ae36625516ccd4a0ffc to your computer and use it in GitHub Desktop.
Save Auke1810/202a0a96614f5ae36625516ccd4a0ffc to your computer and use it in GitHub Desktop.
The wppfm_cdata_keys() function makes it possible to add attributes to be included in CDATA bracket.
function expand_cdata_attributes( $cdata_attributes ) {
// price and availability attributes are added to the list of attributes that are included in a CDATA bracket
array_push( $cdata_attributes, 'price', 'availability' );
return $cdata_attributes;
}
add_filter( 'wppfm_cdata_keys', 'expand_cdata_attributes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment