Skip to content

Instantly share code, notes, and snippets.

@ngearing
Created March 1, 2017 02:56
Show Gist options
  • Save ngearing/daf7d94b7cfec1d9d10885e9bcd79d9e to your computer and use it in GitHub Desktop.
Save ngearing/daf7d94b7cfec1d9d10885e9bcd79d9e to your computer and use it in GitHub Desktop.
ACF Pro License update ManageWP
<?php
$pro_license = maybe_unserialize(base64_decode(get_option('acf_pro_license')));
if (!$pro_license || $pro_license['url'] != home_url()) {
$save = array(
'key' => 'license_here',
'url' => home_url()
);
$save = maybe_serialize(base64_encode($save));
$updated = update_option('acf_pro_license', $save);
if ($updated) {
echo 'YES!';
} else {
echo "no...";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment