Your cart is empty!
Prepare Item Details
apply_filters_ref_array( 'vikappointments_prepare_cart_item_details', bool $status, string &$details, VAPCartItem $item )
Fires before displaying the details of a cart item.
Description
Trigger hook to manipulate the description of the item that is displayed within the summary cart. The description is shown within the confirmation page and within the cart widget.
Parameters
- $status
-
(bool) True on success, false otherwise.
- &$details
-
(string) The current item description.
- $item
-
(VAPCartItem) The instance of the cart item.
Example
/**
* Trigger hook to manipulate the description of the item that is displayed
* within the summary cart.
*
* @param boolean $status True on success, false otherwise.
* @param string &$details The description to show.
* @param VAPCartItem $item The item instance.
*/
add_filter('vikappointments_prepare_cart_item_details', function($status, &$details, $item)
{
$details .= '<p>This is an additional text to display.</p>';
return true;
}, 10, 3);
Changelog
Version | Description |
---|---|
1.2 | Introduced. |
Last Update: 2021-08-04
Helpful?