Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Algoritmika

    (@algoritmika)

    Hi @tantienhime,

    Could you please elaborate a bit? Do you mean, you need these ACF fields on the checkout page?

    Hi @algoritmika !

    Exactly. I’ve created a couple of ACF’s on the user’s profile that I need the visitor to be entered when a visitor to the site checks out on the checkout page.

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @tantienhime,

    Unfortunately, our plugin can’t display those fields on the checkout page, however, do you really need ACF for this? I mean – when you add a custom field with our plugin, you can enable the “User profile” checkbox in our field’s settings – this way this field will be added to the user profile page as well. Would that solve the problem?

    Hi there.

    I don’t need it to display the results of the field. I need the user to add the data to the fields that I’d already built that use ACF’s for my reports. I built it to be independent of WooCommerce in case they no longer need it, given that LearnDash is releasing the ability to pay for courses, etc., without dependency on WooCommerce.

    You might be right, but I was trying to limit the dependencies on too many other things. My job was to produce the report, but because we can’t capture the information from the user, my plugin only does half the job.

    Does that make sense?

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @tantienhime,

    Sorry for the late reply.

    Unless I’m missing something, I still think that you can achieve what you need by enabling our “User profile” checkbox. The field will be added to the checkout, and when a user makes an order and fills in this field, the field’s value will also be saved/updated in the user profile as well.

    Let’s say you add a custom checkout field with our plugin. If you add it to the Billing section, then the field’s ID will be _billing_alg_wc_checkout_field_1, i.e. you can get it from the order with:

    get_post_meta( $order_id, '_billing_alg_wc_checkout_field_1', true );
    

    Now if you’ve enabled our “User profile” checkbox, then this field will also be saved in the user meta as well. And every time user makes a new order, the field value will be overwritten in case if the user fills it in with a new value. The key in user meta is almost identical to the order meta, except the leading underscore symbol, i.e. billing_alg_wc_checkout_field_1, so you can get it (and use it in your reports) from the user meta with:

    get_user_meta( $user_id, 'billing_alg_wc_checkout_field_1', true );
    

    Please let me know what you think.

    Plugin Author Algoritmika

    (@algoritmika)

    I’m going to mark this thread as “resolved” for now, hope that’s ok. Please let me know if there are still any questions/issues.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘ACF Integration’ is closed to new replies.