Hi Mohammad!
To add to my message, I am having with the ajax when I am adding an item to my cart.
I added the following snippet from woothemes to change the text on the button from add to cart to just add.
Now, when I added this, I lost the Ajax feature. Instead of the item just adding and staying at the product, it now loads to the top of the page..
Can you please assist on this and get it back to the way it was prior – but still have the text changed!
Thanks so much!
add_filter( ‘add_to_cart_text’, ‘woo_custom_single_add_to_cart_text’ ); // < 2.1
add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_single_add_to_cart_text’ ); // 2.1 +
function woo_custom_single_add_to_cart_text() {
return __( ‘ADD TO BAG’, ‘woocommerce’ );
}
add_filter( ‘add_to_cart_text’, ‘woo_custom_product_add_to_cart_text’ ); // < 2.1
add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woo_custom_product_add_to_cart_text’ ); // 2.1 +
function woo_custom_product_add_to_cart_text() {
return __( ‘+ ADD’, ‘woocommerce’ );
}
function move_add_to_cart(){
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 30 );
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 15 );
}
add_action( ‘wp’, ‘move_add_to_cart’ );