Sunday, June 19, 2022
HomeWordPress Developmentphp - Wordpress Customized Add To Cart Button with AJAX

php – WordPress Customized Add To Cart Button with AJAX


i made a customized add to cart button however i cant load it with ajax right here is the code.

i added this code into my capabilities.php

// Add "Add To Cart" button  //
add_action('woocommerce_after_shop_loop_item', 'add_a_custom_button2', 13 );
perform add_a_custom_button2()  $product->is_type('grouped') ) return;

    // Output the customized button linked to the product
    echo '<div model="margin-bottom:10px;">
        <a category="customviewaddtocartbutton" href="' . esc_attr( $product->add_to_cart_url() ) . '">' . __('Add To Cart') . '</a>
    </div>';

can anybody assist me please, Thank You <3

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments