1. Home
  2. Developers
  3. How to display data before/after cart items

How to display data before/after cart items

We’ve introduced two new hooks in the Caddy cart screen to display the data before/after the cart items.

The two hooks are listed below:
do_action( 'caddy_before_cart_items' );
do_action( 'caddy_after_cart_items' );

Below is the sample code on how to add data after the cart items:
add_action( 'caddy_after_cart_items', 'mytheme_display_custom_data' );
function mytheme_display_custom_data() {
// your code here
}

You can add this sample code anywhere in the plugin or in the functions.php file of your theme.

Updated on March 2, 2022

Was this article helpful?

Related Articles

Leave a Comment