skip to Main Content

I want to change some custom WooCommerce checkout fields (created by a checkout plugin) and these are stored as original WordPress custom fields.

But because I have installed the Advanced Custom Fields plugin, the original Custom Fields tab is gone.

I tried to add the following code to my function.php without any result:

add_filter('acf/settings/remove_wp_meta_box', '__return_false');

Just to be sure I deactivated the ACF Pro plugin to be 100% sure this was the issue and the tabs where back 🙂

Anyone an other idea to get the original Custom Fields tab back?

2

Answers


  1. Your priority might not be enough. Try like this.

    add_filter('acf/settings/remove_wp_meta_box', '__return_false', 20);
    

    EDIT

    Please try to initialize ACF with this code

    function my_acf_init() {
        acf_update_setting('remove_wp_meta_box', false);
    }
    
    add_action('acf/init', 'my_acf_init');
    
    Login or Signup to reply.
  2. In my case, I was registering a custom post type without declaring support for custom-fields. The other answers would have worked for standard pages.

    $books_args =[
      'supports' => [ 'title', 'editor', 'author', 'custom-fields' ]
    ];
    register_post_type( 'book', $books_args );
    

    Obviously you would need to adapt this this to your custom post type

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search