Home › Forums › ACF PRO › ACF Pro 5.5.0 › Reply To: ACF Pro 5.5.0
function wpa__prelicense() {
if( function_exists('acf_pro_is_license_active') && !acf_pro_is_license_active() ) {
$args = array(
'_nonce' => wp_create_nonce('activate_pro_licence'),
'acf_license' => base64_encode('MY_LICENSE_STRING'),
'acf_version' => acf_get_setting('version'),
'wp_name' => get_bloginfo('name'),
'wp_url' => home_url(),
'wp_version' => get_bloginfo('version'),
'wp_language' => get_bloginfo('language'),
'wp_timezone' => get_option('timezone_string'),
);
$response = acf_pro_get_remote_response( 'activate-license', $args );
$response = json_decode($response, true);
if( $response['status'] == 1 ) {
acf_pro_update_license($response['license']);
}
}
}
add_action( 'after_setup_theme', 'wpa__prelicense' );
That code worked before an update to 5.5.0 & error are visible with qTranslate, when I changed the language to NOT default.
You can see error here http://trachuk.dev0.site/en/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.