Up to 50 percent off

WooCommerce MetaKey _price mapping incorrectly

This topic contains 6 reply and 3 voices, and was last updated by Antony 9 years, 11 months ago
Viewing 6 Posts - 1 through 6 (of 6 total)
Author Posts
July 9, 2014 at 10:09 pm 23249
Antony We've set up a product submission form as documented here: http://docs.wedevs.com/woocommerce-with-wp-user-frontend-pro-tutorial-part-1/ However, the price entered does not map to the correct field, resulting in the product being hidden from the shop page (I think this is WooCommerce default behavior, to hide products when price is null). It appears the _price Meta Key maps to a custom field, instead of the WooCommerce Regular Price field, which needs to have a value for the product to show. Here's the way the field looks in WPUFP: And here's the product, everything is perfect except for the Regular Price field: What is the correct key/field configuration to have the user enter the Regular Price?
July 10, 2014 at 4:47 pm 23294
Sekander Badsha Sekander Badsha

The key should be ‘_regular_price’.

July 11, 2014 at 12:23 am 23328
Kevin Kevin

Thanks, that got the price to enter correctly, however, the product still doesn’t appear on the store page. I belive we have everything set up correctly to create a virtual downlodable product, however when the product is submitted we do not see it on the front-end listings. We do, however, see it in the back-end — and simply opening the product and clicking update makes the product show on our page. Here is how our product submission form is set up:

July 12, 2014 at 2:52 pm 23373
Sekander Badsha Sekander Badsha

You’ll have to add one more hidden field with a “Meta Key: _visibility” and value “visible”.

July 14, 2014 at 11:27 pm 23557
Kevin Kevin

Thank you Sekander… That did fix the visibility issue.

Interestingly enough the price is no longer showing up when the product is initially submitted. I believe this happened when we changed the MetaKey to _regular_price. When a product is submitted no price shows up? See screenshot.

No Price on Product - Screenshot

Also, a “Sale” tag is automatically applied to the product, but we’re not entering a sale price. Which brings up a good point. How would we set it up so that the user could submit a sale price? MetaKey _sale_price ?

Thanks!

July 16, 2014 at 4:44 pm 23659
Sekander Badsha Sekander Badsha

Hello Kevin,
Please try with the key “_price” instead of “_regular_price” and see what happens. And don’t forget to tell us the result.

December 18, 2014 at 11:11 am 32512
Antony Antony

I’m in the same boat so what’s the result to the fix? Screenshots would be good 😀

Viewing 6 Posts - 1 through 6 (of 6 total)