• Resolved math1991

    (@math1991)


    Hi, I have copied the quantity-input.php file into my child theme and changed it slightly and used the path yourtheme/smntcs-woocommerce-quantity-buttons/global/quantity-input.php as stated in the file but nothing has changed. Can you clarify that this is the correct path?

    Thanks

    Mat

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Niels Lange

    (@nielslange)

    Hello @math1991,

    The file quantity-input.php is located in /wp-content/plugins/smntcs-woocommerce-quantity-buttons/template/global.

    May I ask what you’re aiming for? Maybe you can report what you’re missing on https://github.com/nielslange/smntcs-woocommerce-quantity-buttons/issues so that I can implement it so that others can benefit as well.

    Thread Starter math1991

    (@math1991)

    Yes I know that the file is located there. I want to add a small piece of text at the top of the quantity bar depending on what product they are on. I have tried to override the quantity-input.php file in my child theme but it has not changed anything. I can change it in the main plugin file but I don’t want to do this due to updates of this plugin.

    Thanks

    Plugin Author Niels Lange

    (@nielslange)

    @math1991 I assume you haven’t tried using the default WooCommerce hooks yet, have you? You could add the following snippets to your functions.php or store them in a separate plugin:

    
    // Add custom message before the add to cart button
    add_action( 'woocommerce_before_add_to_cart_button', function() {
      echo '<div>woocommerce_before_add_to_cart_button</div>';
    } );
    
    // Add custom message after the add to cart button
    add_action( 'woocommerce_after_add_to_cart_button', function() {
      echo '<div>woocommerce_after_add_to_cart_button</div>';
    } );
    
    • This reply was modified 5 years, 3 months ago by Niels Lange.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Override plugin template’ is closed to new replies.