@darrion.kuhn
To add a second "Add to Cart" button on a WooCommerce product page, you can create a custom function in your theme's functions.php file. Here's how you can do it:
1 2 3 4 5 6 7 8 9 10 11 |
// Add a second Add to Cart button on product page add_action( 'woocommerce_after_add_to_cart_button', 'add_second_add_to_cart_button' ); function add_second_add_to_cart_button() { global $product; // Check if the product is purchasable if ( $product->is_purchasable() ) { echo '<a href="' . esc_url( $product->add_to_cart_url() ) . '" data-quantity="1" class="button alt add_to_cart_button">' . __('Add to Cart', 'woocommerce') . '</a>'; } } |
Note: Make sure to test the functionality of the new button to ensure it works as expected. You may need to adjust the layout or styling of the button to fit your theme's design.