Repository Forums Support WooCommerce Extended Coupon Features PRO Free Product Variable Name Reply To: Free Product Variable Name

#1067
Soft79
Keymaster

Hi Richard,

copies the contents of the wp-content/woocommerce-auto-added-coupons-pro/template/ directory to wp-content/YOUR_CHILD_THEME/woocommerce-auto-added-coupons/

this will yield:
wp-content/YOUR_CHILD_THEME/woocommerce-auto-added-coupons/cart/select-free-product.php
wp-content/YOUR_CHILD_THEME/woocommerce-auto-added-coupons/checkout/select-free-product.php

in these files find:


echo esc_html__( $product->get_title(), 'woocommerce' ) . '<br>' . $product->get_image();

and replace with:

echo esc_html__( $product->get_title(), 'woocommerce' );

if ( $product instanceof WC_Product_Variation ) { 
	echo "<br>" . $product->get_formatted_variation_attributes( true );
}

echo '<br>' . $product->get_image();