Please check below code :
add_action( 'woocommerce_single_product_summary','content_after_addtocart_button' );
function content_after_addtocart_button() {
global $product;
$product_title = $product->get_name();
$product_price = $product->get_price();
echo '<div class="content-section">
<a href="https://wordpress.stackexchange.com/questions/340361/mailto:[email protected]?&subject=Richiesta Informazioni&body=" . $product_title . '??? ' . $product_price . ' ??? ">
<input type="button" value="Richiedi Informazioni"/ ></a></div>';
}
Related Posts:
- Woocommerce – remove product from category
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Hide child of parent categories already hidden with “get_terms_args” – Woocommerce
- Edit tag cloud widget number
- How to automatically apply woocommerce product title to all product images alt tags?
- exclude multiple terms using get_terms() function
- retrieve thumbnail from post ID of best selling product in category
- How to get the original price of the product in woocommerce?
- Woocommerce auto cancel On-Hold after X days
- Allow authors to post only in categories they create in WordPress
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- Add custom field to attachments in a specific category
- WooCommerce – Customer Order History Pagination
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- How to Populate the list of custom post type categories
- Php string not working in WordPress Functions.php [duplicate]
- WooCommerce – Display variation custom field value [closed]
- Output a WooCommerce product custom field in WooCommerce using get_post_meta()
- Woocommerce: Is it possible to overide the settings for allowing to purchase out of stock products [closed]
- Problems with function on function.php
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to add SVG icon above product tab title
- Check if Product is in a Specific Category in Functions.php
- Use is_product_category() properly
- My Own layout in WooCommerce pages [closed]
- How do I publish only one page to production after making changes on staging?
- Limiting woocommerce line_total decimal length
- WooCommerce – Reset quantity input field when variation changes
- Swapping wp_dropdown_categories function with wp_category_checklist
- Automatically remove a canceled order in Woocommerce
- Issue adding sub category programmatically
- How can I apply_filters from inside a function?
- Auto-update products after they were published – Woocommerce
- Woocommerce related product text
- How to pick the default selected value in wordpress dropdown?
- Woocommerce: hook action/filter I could use to add variation id and price with each attribute opt on WooCommerce Rest api
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- WooCommerce: How can I get orders with a custom ID in order meta data object?
- Incorrect amount of posts returned when filtering related Woo products by custom taxonomy
- Edit the_category (); for a hierarchical display
- get taxonomy thumbnail and use it as a variable in code
- Displaying posts based on category
- Add product to cart for user – WC()->cart->add_to_cart [closed]
- Remove item in Checkout
- Only show size attributes in product box woocommerce when available
- Personalize checkout text
- How to get current post category details inside “loop”?
- CSS change in woo commerce Place Order Text [closed]
- WP All Import / Update stock quantity from multiple XML files
- Show all tags within a category?
- How do i wrap woocomerce attribute in list?
- Removing files programmatically
- WooCommerce: Display product categories to make IF statement
- Custom Taxonomy Select Menu: Setting default option value?
- Execute PHP code only with specific user role
- Display Sibling WooCommerce Product Categories on Archive Page
- Woocommerce order status payment
- Modify WooCommerce used to get all orders in dashboard
- Woocommerce. Get a list of products in the current category on the archive page and product page
- Add Custom Category Description When Empty
- Add a product category to a specific product via a button
- Woocommerce My acount page
- Woocommerce – Exclude variation attribute on specific variation
- Dropdown category field inside repeatable metabox
- PHP function for horizontal Woocommerce thumbnails and badges
- Run a sql (update) after 12 hours after the user login. Woocommerce users
- php code for outputting a custom page in my account
- Hide specific shipping methode depending on day and time of day
- Programmatically add a product to the cart and set price to zero when buying from certain category
- I want to show cart items number if any or nothing, simple CART text
- Adding custom field to product category and show it to shop/category shop page
- Hide payment method based on user role AND minimum cart value
- WooCommerce display price before add to cart [closed]
- Remove span tags from WooCommerce Downloads page
- How to move a post from one category to another
- Including user data in “new user notification email”
- Hide a specific category title from displaying on site
- Add Product Permalink in woocommerce admin order page
- How to auto-generate random numbers in username?
- Remove generated category and tag class names from woocommerce product & blog listings markup
- WP_Query To Display Product Of Brand On Taxonomy Page
- Woocommerce Add custom “Add to cart button” in single page with tags
- Get Billing Email from WooCommece Checkout and Pass to Fullstory JS
- Populate Posts based on category selected using AJAX that means without page refresh
- All categories options or All categories not Populating
- random woocommerce categories are not showing when count enabled?
- Customizing the output of the archive and category widget without altering the original behavior of the widget
- Display text of price (minus 20%) on every product page in a sentence.
- WordPress using get_term to retreive slug not working as expected
- Woocommerce Price Text
- Get category id for a custom category and display it in a class
- Trying to see if page is category or single and displaying title with appropriate heading tag
- How to add margin underneath woocommerce total price amount -> productpages
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- How to insert the first letter in uppercase [closed]
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Automatically change insurance quantity based on cart total [closed]
- Exclude a category ID from the following function
- Add text below WooCommerce short description if metabox value is true