Hello @sintarta,
Add the following code snippet at the bottom of your child theme’s functions.php file to remove prefixes from your category. If you do not have a child theme, you can utilize the WPCode plugin.
#== Truncate Text from Category Attribute ==#
function truncate_category_attribute_values( $product_data, $feed, $product ) {
if( isset( $product_data[ 'category_path' ] ) ) {
$truncate_cats = str_replace( "Ab - ", "", $product_data[ 'category_path' ] ); // replace "Ab - " with your prefix
$product_data[ 'category_path' ] = $truncate_cats;
}
return $product_data;
}
add_filter( 'adt_get_product_data', 'truncate_category_attribute_values', 10, 3 );
This code will remove the prefix if you’ve mapped the Category Path attribute. However, if you’ve mapped the Category Path Short attribute instead, replace category_path with category_path_short in the code.
Cheers!