13

I made custom attribute for variation other than size or colour, but when i apply as variation to this attribute its not showing on single page.

5
  • What was the name of your custom attribute? Commented Jun 29, 2016 at 6:51
  • Look at line 9 of your custom attribute, the error is there Commented Jun 29, 2016 at 6:51
  • Attribute name: Custom Box Commented Jun 29, 2016 at 6:52
  • Ok did you fill all required fields properly for each variation? Such as price. Commented Jun 29, 2016 at 6:54
  • Yes prices are same but i fill each variation correctly.(I think) Commented Jun 29, 2016 at 6:56

1 Answer 1

26

It's seems you have all variations same price. That's why it's not showing, it's a WooCommerce default behavior. You can change this WooCommerce default variable price filter with this hook.

   add_filter('woocommerce_show_variation_price',      function() { return TRUE;});
4
  • Add this code on your functions.php file Commented Jun 29, 2016 at 7:04
  • 14
    +1, nice find. I might just use WordPress's built in function to simplify it a bit: add filter( 'woocommerce_show_variation_price', '__return_true' );.
    – Dominic P
    Commented Sep 27, 2016 at 21:59
  • Thank You it's working fine now Commented Feb 29, 2020 at 3:17
  • It worked for me as well! Commented Aug 13, 2020 at 17:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.