Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Define the Advanced Custom Fields Pro license key with a constant
<?php
function my_filter_acf_pro_license_option( $pre ) {
if ( ! defined( 'ACF_PRO_LICENSE' ) || empty( ACF_PRO_LICENSE ) ) {
return $pre;
}
$data = array(
'key' => ACF_PRO_LICENSE,
'url' => home_url(),
);
return base64_encode( serialize( $data ) );
}
add_filter( 'pre_option_acf_pro_license', 'my_filter_acf_pro_license_option' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.