public/wordpress/wp-content/plugins/wp-courseware/includes/functions/cart.php
/**
 * Remove from cart link.
 *
 * @since 4.3.0
 *
 * @param string $key The course cart key.
 * @param array  $args The array of arguments to pass to the button
 *
 * @return string The cart link html.
 */
Remove from cart link.

@param string $key The course cart key.
@param array  $args The array of arguments to pass to the button

@return string The cart link html.
Remove from cart link . @param string $key The course cart key . @param array $args The array of arguments to pass to the button @return string The cart link html .
function wpcw_remove_from_cart_link( $course_key, $args = array() ) {
	$defaults = array(
		'icon'       => '<i class="wpcw-far wpcw-fa-times-circle"></i>',
		'text'       => '',
		'class'      => implode( ' ', array_filter( array(
			'wpcw-remove-from-cart',
			apply_filters( 'wpcw_cart_ajax_enabled', true ) ? 'wpcw-ajax-remove-from-cart' : '',
		) ) ),
		'attributes' => array(
			'rel' => 'nofollow',
		),
	);
	$args = apply_filters( 'wpcw_remove_from_cart_args', wp_parse_args( $args, $defaults ), $course_key );
	return apply_filters( 'wpcw_remove_from_cart_link', sprintf(
		'<a href="%s" class="%s" %s>%s</a>',
		esc_url( wpcw_remove_from_cart_url( $course_key ) ),
		esc_attr( isset( $args['class'] ) ? $args['class'] : 'wpcw-button' ),
		isset( $args['attributes'] ) ? wpcw_implode_html_attributes( $args['attributes'] ) : '',
		$args['icon']
	), $course_key, $args );
}
function wpcw_remove_from_cart_link ( $ course_key , $ args = array ( ) ) { $ defaults = array ( 'icon' => '<i class="wpcw-far wpcw-fa-times-circle"></i>' , 'text' => '' , 'class' => implode ( ' ' , array_filter ( array ( 'wpcw-remove-from-cart' , apply_filters ( 'wpcw_cart_ajax_enabled' , true ) ? 'wpcw-ajax-remove-from-cart' : '' , ) ) ) , 'attributes' => array ( 'rel' => 'nofollow' , ) , ) ; $ args = apply_filters ( 'wpcw_remove_from_cart_args' , wp_parse_args ( $ args , $ defaults ) , $ course_key ) ; return apply_filters ( 'wpcw_remove_from_cart_link' , sprintf ( '<a href="%s" class="%s" %s>%s</a>' , esc_url ( wpcw_remove_from_cart_url ( $ course_key ) ) , esc_attr ( isset ( $ args [ 'class' ] ) ? $ args [ 'class' ] : 'wpcw-button' ) , isset ( $ args [ 'attributes' ] ) ? wpcw_implode_html_attributes ( $ args [ 'attributes' ] ) : '' , $ args [ 'icon' ] ) , $ course_key , $ args ) ; }
Remove from cart link.
Remove from cart link .