Support

Account

Home Forums ACF PRO use acf in custom admin link

Solving

use acf in custom admin link

  • hi
    i have admin link like this:
    wp-admin/admin.php?page=wcpv-vendor-settings
    how can i use acf in this page
    thanks

  • You can’t. ACF field groups cannot be added to this type of admin page.

    If there was an existing hook inside of the WC form for this page you might be able to use acf_form(), but since not actions of filters exist inside of the form element, that’s also not an option.

  • even with Custom location rules?
    is possible to create my own location rules for this page?
    thanks

  • ACF location rules depend on standard WP hooks to load the fields. I looked at the admin page for WC and it does not have any of these hooks. Nor does it have any hook at all inside of the form that WC uses. Without these hooks, the only way to add ACF fields to the page would be to alter core code of WC. Most admin pages for other plugins will be the same.

  • From WooCommerce Product Vendors v2.1.55

    * Add – New action on Vendor Profile screen, wcpv_vendor_settings_render_additional_fields, to enable other plugins to add additional settings fields.

    So now it seems that could be done.

    But how? Could you please share the code? I’m having some trouble with this.

    Tks

  • You would still need to use acf_form() to do this with 'form; => false so that ACF does not add the form tags and uses the form tags supplied by WC.

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

The topic ‘use acf in custom admin link’ is closed to new replies.