Support

Account

Home Forums Bug Reports wpml.php's acf/settings/load_json filter not being executed

Solved

wpml.php's acf/settings/load_json filter not being executed

  • Hey Elliot,

    I’m working on a site running WPML 3.2.7 and ACF PRO 5.3.2.1. When I create a new field group its JSON file is nicely placed in a language folder like acf-json/[language], but the JSON files are not loaded from that same folder, but from the default acf-json/ folder. I’ve done some debugging and it seems the filter acf/settings/load_json that is set in the construct in wpml.php never gets executed.

    Can you please check if this is something that accidentally slipped in in the latest release? I didn’t experience this before and haven’t been able to track down the culprit myself.

    Thanks in advance!

  • Hi @zwaarcontrast

    Thanks for the bug report.

    I believe this issue is caused by the load order of files.
    Can you please edit the acf.php file and on line 229, move the code block:

    
    // include wpml support
    		if( defined('ICL_SITEPRESS_VERSION') ) {
    		
    			acf_include('core/wpml.php');
    			
    		}
    

    above the line 224

    
    // local fields
    		do_action('acf/include_fields', $major);
    

    Does this fix the issue?

    Thanks
    E

  • Thanks a million! You’re a lifesaver!

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

The topic ‘wpml.php's acf/settings/load_json filter not being executed’ is closed to new replies.