Hi,
I’ve used filter to add short description to products in the WooCommerce cart, how could I use sf_product_description instead of post_excerpt (not on product page but on product list)?
add_filter( ‘woocommerce_get_item_data’, ‘wc_checkout_description_so_15127954’, 10, 2 );
function wc_checkout_description_so_15127954( $other_data, $cart_item )
{
$post_data = get_post( $cart_item[‘product_id’] );
$other_data[] = array( ‘name’ => $post_data->post_excerpt );
return $other_data;
}
Please help.
Best regards,
Ewelina
Attachments:
You must be
logged in to view attached files.