WPIntell

Source evidence

Checkout class for styling

Force Sell for WooCommerce · support · 2024-09-11T13:29:00+00:00

complaintsentiment
highseverity
0.79relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 28 rows with source links

10.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

25 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
stijnwizarts unresolved
Hi, Any way I can add a class in cart/checkout item line so I can style the “force sell” products somewhat different? Or a filter hook or something I can use for this? Hi, “force sell” products are just standard products. You can edit them like any other WooCommerce product in the cart. Code would be something like add_filter( 'woocommerce_cart_item_class', 'cart_item_class_78356783443856', 10, 3 ); function cart_item_class_78356783443856( $class, $cart_item, $cart_item_key ) { if ( ! empty( $cart_item['linked_to'] ) ) { $class .= ' your-custom-class'; } return $class; } Regards, Dmytro

Comments

1 shown
Dmytro Holovnia 2024-09-14T21:59:00+00:00

Hi, “force sell” products are just standard products. You can edit them like any other WooCommerce product in the cart. Code would be something like add_filter( 'woocommerce_cart_item_class', 'cart_item_class_78356783443856', 10, 3 ); function cart_item_class_78356783443856( $class, $cart_item, $cart_item_key ) { if ( ! empty( $cart_item['linked_to'] ) ) { $class .= ' your-custom-class'; } return $class; } Regards, Dmytro