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
- 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?
- 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
- 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
- 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
- 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
- WooCommerce: How can I get orders with a custom ID in order meta data object?
- Dilemma of Populating all the categories in a drop down list
- get taxonomy thumbnail and use it as a variable in code
- Displaying posts based on category
- require_once() if a product in woocommerce contains a tag [closed]
- Remove item in Checkout
- Only show size attributes in product box woocommerce when available
- How do I change this function from two returns to one string to show sku and dimensions in WooCommerce cart?
- Personalize checkout text
- How to get current post category details inside “loop”?
- Changing the order of custom fields in the dashboard for Woocommerce variable products [closed]
- Show all tags within a category?
- Post not populating for custom post type based on category selection
- How do i wrap woocomerce attribute in list?
- Removing files programmatically
- 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
- Woocommerce. Get a list of products in the current category on the archive page and product page
- Woocommerce My acount page
- Woocommerce – Exclude variation attribute on specific variation
- Dropdown category field inside repeatable metabox
- Display Visual Composer shortcode if a post belongs in specific categories
- Billing detail page doesn’t work after I’ve changed the order of the Woocommerce navigation
- PHP function for horizontal Woocommerce thumbnails and badges
- 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
- Discount in the specific product title using keyword ( Woocoommerce )
- Including user data in “new user notification email”
- Hide a specific category title from displaying on site
- Woocommerce textarea format ignored
- 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
- Add missing alt tag to featured images for “storefront” theme
- Need Quick Help With Product Category Page
- 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
- How to get the rating value of each comment
- How to add margin underneath woocommerce total price amount -> productpages
- Displaying categories
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- Product Category Page in Full Width
- How to insert the first letter in uppercase [closed]
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Replace the image of a product with its video in the shop page
- How call WordPress shortcode inside function file
- strict custom php script on specific product category [closed]
- Change WooCommerce Order status from frontend form submitted data
- Exclude a category ID from the following function
- Add text below WooCommerce short description if metabox value is true
- Woocomerce custom add to cart button edit functionality [closed]
- How to change product title color in shop page if product has specific product tag (Woocommerce)?
- How to get default variation ID (woocommerce)