![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/walla3t.corals.io/wp-content/themes/apper/woocommerce/loop/ |
<?php /** * Loop Add to Cart * * This template can be overridden by copying it to yourtheme/woocommerce/loop/add-to-cart.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce/Templates * @version 9999 */ if ( ! defined( 'ABSPATH' ) ) { exit; } global $product; $classes = array(); $classes[] = 'btn-add-to-cart'; if( $product->is_type('simple') ) { $classes[] = 'ajax_add_to_cart'; $classes[] = 'add_to_cart_button'; } $classes = implode( ' ', $classes ); echo apply_filters( 'woocommerce_loop_add_to_cart_link', // WPCS: XSS ok. sprintf( '<a href="%s" data-quantity="%s" class="%s" %s><span class="icon icon-basket-loaded"></span></a>', esc_url( $product->add_to_cart_url() ), esc_attr( isset( $args['quantity'] ) ? $args['quantity'] : 1 ), esc_attr( $classes ), isset( $args['attributes'] ) ? wc_implode_html_attributes( $args['attributes'] ) : '' ), $product, $args );