I am trying to add a second button called "pay online" on a single product page with the Custom Fields Plugin, but I am getting this error/output: ?>

You can also see the problem following this link: Here

The theme is "Mixtape", could this maybe be some plugin conflic with the theme?

here is mistake in variable.php

<form class="variations_form cart" action="<?php echo esc_url( apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ) ); ?>" method="post" enctype='multipart/form-data' data-product_id="<?php echo absint( $product->get_id() ); ?>" data-product_variations="<?php echo htmlspecialchars( wp_json_encode( $available_variations ) ); // WPCS: XSS ok. ?>">
    <?php do_action( 'woocommerce_before_variations_form' ); ?>
  • Maybe i explained wrong my extra button pay online works fine, but simple add to cart button doesnt work properly and error ?> is on his place. I checked my single-product.php file he looks ok. last php bracket is not closed. – Snatch Dec 7 at 12:42
  • @Snatch yes, you explained that extremely wrong. – marvinpoo Dec 7 at 12:45
  • i cant find single.product.php file hook where i should look for it – Snatch Dec 7 at 12:52
  • there is no hook add to cart there, just some other hooks. they are all closed properly. – Snatch Dec 7 at 12:57
  • i checked variaton-add-to-cart-button.php all php tags are closed properly and they are all inside one div. – Snatch Dec 7 at 13:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.