Home Forums Plugin Support WP User Frontend Pro WooCommerce MetaKey _price mapping incorrectly

This topic is: resolved

This topic contains 6 replies, has 3 voices, and was last updated by  Antony 4 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #23249

    Kevin
    Member
    Post count: 46

    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?

    #23294

    Sekander Badsha
    Member
    Post count: 2067

    The key should be ‘_regular_price'.

    #23328

    Kevin
    Member
    Post count: 46

    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:

    #23373

    Sekander Badsha
    Member
    Post count: 2067

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

    #23557

    Kevin
    Member
    Post count: 46

    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!

    #23659

    Sekander Badsha
    Member
    Post count: 2067

    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.

    #32512

    Antony
    Member
    Post count: 4

    I'm in the same boat so what's the result to the fix? Screenshots would be good ๐Ÿ˜€

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘WooCommerce MetaKey _price mapping incorrectly’ is closed to new replies.