• Hi there,

    I’m using Woocommerce with Adavnced Custom Fields. I’d like to be able to carry out calculations that involve the Woocommerce product price. Is this possible?

    As an example, if I sold a box of 10 coloring pencils, as well as displaying the price in the normal way, I’d also like to be able to show the “price per pencil” as a custom field. This would entail dividing the Woocommerce price by a custom field and then outputting as a second custom field on the product page?

Viewing 1 replies (of 1 total)
  • Plugin Contributor nick6352683

    (@nick6352683)

    I did not have the time to test this, but my guess is as a short answer, no.

    The Price field is not an ACF field, so unless you find a way to reference it in your calculated field in ACF, this is not possible.

    Without thinking too much about it, and let’s assume what I mentioned above is not possible, the only way I can think of is to create a numeric Price field in your ACF field group, and with a function populate this ACF Price field from the Woo Price field, when the product is saved, or simply manually populate the ACF Price field yourself. Only then, you can accomplish the task…

    Then again, I did not test anything that I mentioned, so I can be 100% correct, or 100% wrong.

Viewing 1 replies (of 1 total)
  • The topic ‘Can I use Woocommerce product price?’ is closed to new replies.