<?php
/**
 * @var $custom_extra_data
 * @var $include_ul
 * @var $ul_class
 * @var $li_class
 * @var $order
 */

if ( $custom_extra_data ) {

	if ( $include_ul ) { ?>

		<ul class="<?php echo $ul_class; ?>">

	<?php }

		foreach ( $custom_extra_data as $key => $ce ) { ?>

			<li class="<?php echo $li_class; ?>">
				<div class="cp-price-extra"><?php echo wpj_show_price_classic( apply_filters( 'wpj_custom_extra_price_filter', $ce['amount'], $ce['custom_extra_id'], $order ), 1 ); ?></div>
				<div class="cp-title-extra"><?php echo apply_filters( 'wpj_custom_extra_string_with_dots_filter', __( 'Custom extra:', 'wpjobster' ) ) . '&nbsp;' . $ce['description']; ?></div>
			</li>

		<?php }

	if ( $include_ul ) { ?>

		</ul>

	<?php }

} else echo '<style>.order-custom-extras-row-wrapper{display:none;}</style>'; // for page builder