I have written the following PHP code: the_field() is a function of “advanced custom fields” Plugin. https://www.advancedcustomfields.com/resources/the_field/ The problem is that only the variable is output, but not the HTML part. How can I solve the problem? Answer I don’t know why, but the following code worked:
Tag: woocommerce
Get only one product category term for a WooCommerce product
I have a mystery with the categories from WooCommerce. For different products I have multiple categories. For example the product Nike Air Red I connect this product with two categories Brands->Nike and Shoes->Red Brands and Shoes are main categories and Nike and Red are subcategories. On the product page I have the following code The output is NikeRed Is there
Display related products using a shortcode on WooCommerce My account Dashboard
I’m trying to display related products in My account Dashboard page. I followed this WooCommerce Shortcodes documentation. I tried to use the following code: This does not display the related products. But when I try to display products in specific category like following, it works: Kindly any help to resolve this? Answer Note that related products shortcode need to be
Save WooCommerce order total volume as a custom field for Shipstation
I’ve been coding a WP plugin for Calculating the square inch total volume for an order and send it via custom field to Shipstation: I uploaded it via SFTP to the sites files and it shows up on WP but when I click activate I get a fatal error: Fatal error: Uncaught Error: Call to a member function get_cart() on
Add text after shipping method label in woocommerce_package_rates hook
I have multiple shipping options on my page and wanted to put the label “free” next to them when the customer buys goods for more then 2500 czech crowns. I’m using Set all shipping methods costs to zero based on cart items subtotal in WooCommerce answer code which makes the shipping methods free, but it doesn’t put the label next
Enhanced WooCommerce Custom Fields for Variations
Using the Remi Coulson tutorial, a custom field has been added for product variations. This works, however the custom field is positioned by the add-to-cart button. I wish to position it within Additional Information tab. I have tried adding the front end code to the additional-information.php but it does not display. Added to functions.php to display variation Answer Note that
Change product name for generated variable products in WooCommerce
TL;DR version How do I change the name that is automatically generated for variable products? Detailed version The product variations all get names based on the variable attributes they generate from. Example Let’s say that there’s the varible product: Vase. Vase has the attribute: Condition, with values: ‘New’ ‘Refurbished’ ‘Used’. So if I do this (get and output all variation
Hide all products with a specific stock status from WooCommerce catalog
I’m using Flatsome template on Wordpress and Woocommerce site. I also create custom stock status (example noproduzione, used when a product is not created anymore from manufacturer). But I don’t want to show this products (noproduzione stock status) on my site (only in admin pages). I’m using this code that I write here (I put it in my functions.php file),
Reorder customer details in WooCommerce email notifications
I am trying to change the order of the customer details fields displayed in the Woocommerce mail sent to both customer and admin after purchase (table name: addresses). I checked the file responsible of outputting the billing & shipping fields which is plugins/woocommerce/templates/email-customer-details.php but the customer details are outputted only through a foreach loop and the variable $fields is not
Change payment card icons for WooCommerce Stripe in checkout
I would like to sort the Stripe displayed payment card icons in a different way in WooCommerce checkout. WooCommerce Stripe plugin support does not provide custom code support so they just gave me a code snippet to modify according to my needs. This code snippet changes out the Visa payment icon: Could someone please modify this code snippet to change