Skip to content

Instantly share code, notes, and snippets.

@Auke1810
Created August 25, 2022 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Auke1810/082d74e42c158f37815832ba2d7b8c0f to your computer and use it in GitHub Desktop.
Save Auke1810/082d74e42c158f37815832ba2d7b8c0f to your computer and use it in GitHub Desktop.
Strip   from description attributes in the woocommerce product feed manager from wpmarketingrobot.com
<?php
function alter_feed_item( $attributes, $feed_id, $product_id ) {
// Strip &nbsp; from description attributes
$attributes['description'] = str_replace('&nbsp;', ' ', $attributes['description']);
// IMPORTANT! Always return the $attributes
return $attributes;
}
add_filter( 'wppfm_feed_item_value', 'alter_feed_item', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment