Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Get coupon description using WC_Coupon::get_description()
= 2.5.4 =
* TWEAK: Get coupon description using WC_Coupon::get_description() to respect applicable filters (for example used by Polylang)
I was checking this and I found that to get the results I expected I need to change WJECF_Wrap.php get_description() last line
return apply_filters( 'woocommerce_coupon_get_description',
$post->post_excerpt, $post );
could this be included in a future patch…
Is this in combination with WooCommerce 2.6 by any chance?
that was with WooCommerce 3.2.1
The same applies to the latest Coupons 22.214.171.124
Coupon description comes from the excerpt field and since you are using $post->post_excerpt; rather than woocommerce api the woocommerce filters won’t be called
I see what’s happening:
The false && must be removed from the first line of the function:
if ( false && $this->use_wc27 && is_callable( array( $this->object, 'get_description' ) ) )
Will remove it in the next version.
$post->post_excerpt must only be called as a fallback for WC < 3.0