Resolvedchange buy button on the product page

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25568
    danilodorgam
    Participant

    Which file should I access to edit the text and function called when I click this button?

    file:woocommerce-functions.php:1083

      <button type="submit" class="single_add_to_cart_button button alt"><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
    

    Changing the line above had no effect

    #25577
    Althemist
    Keymaster

    The easiest (and safest) way to change the text string would be with a plugin like Loco Translate:

    Loco Translate

    Not really sure what do you mean by to “edit the function called when I click this button”. IT can’t be changed. It’s the core WooCommerce add to cart button and it can be used for different purpose.

    Regards,
    Dimitar

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register