options = get_option('yofla_360_options');
$active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'general';
?>
360° Product Rotation Plugin Settings
';
// This prints out all hidden setting fields
settings_fields('yofla_360_option_group');
do_settings_sections('yofla-360-admin-legacy');
submit_button();
echo '';
} elseif ($active_tab == 'x_woocommerce') {
echo '
';
} else {
?>
Cache Settings
Utils()->clear_cache()) {
echo '
Cache cleared! ';
} else {
echo '
Failed deleting cache! ';
}
}
?>
Delete the content of the wp-content/uploads/yofla360/_cache directory. Useful when
migrating
the site from http to https.
';
wp_nonce_field('test_button_clicked');
echo '
';
submit_button('Delete Cache');
echo '';
echo '
';
} // end if/else
?>
License Key:',
array($this, 'licensekey_callback'),
'yofla-360-admin',
'yofla_360_settings_section_general'
);
//license id in legacy settings
add_settings_field(
'license_id',
'';
$this->print_section_info_legacy();
if (isset($this->options['license_id']) && strlen($this->options['license_id']) > 0) {
$firstTwoChars = strtolower( substr($this->options['license_id'],0,2));
if($firstTwoChars == 'yc'){
echo '
Cloud based license key should not be used here! (only legacy license keys)
';
$this->options['license_id'] = '';
update_option('yofla_360_options', $this->options);
}
else{
$data = $this->_get_order_data($this->options['license_id']);
if (gettype($data) == 'array') {
//$updates_end_days = round((strtotime($data['updatesend'])-time())/(60*60*24));
//$updatesend = date_format(date_create(strtotime($data['updatesend'])), 'g:ia \o\n l jS F Y');
$updatesend = date('jS F Y', strtotime($data['updatesend']));
//$updatesend = $data['updatesend'];
$out = "
";
$out .= "";
$out .= " ";
$out .= " 360° Rotations by:";
$out .= " ";
$out .= " ";
$out .= " {$data['license_holder']} ";
$out .= " ";
$out .= " ";
$out .= "";
$out .= " ";
$out .= " License type:";
$out .= " ";
$out .= " ";
$out .= " {$data['productid']}";
$out .= " ";
$out .= " ";
$out .= "";
$out .= " ";
$out .= " Free updates until:";
$out .= " ";
$out .= " ";
$out .= " {$updatesend}";
$out .= " ";
$out .= " ";
$out .= "
";
echo $out;
//update license id
if (isset($data['orderuid'])) {
$this->options['license_id'] = $data['orderuid'];
update_option('yofla_360_options', $this->options);
}
} elseif (gettype($data) == 'string') {
echo '
' . $data . '
';
} else {
echo '
License Key is invalid!
';
//remove void option
$this->options['license_id'] = '';
update_option('yofla_360_options', $this->options);
}
}
}
$msg = '
Please enter your License Key or License ID to replace the free 360° player with a licensed version. License Key will be converted to License ID after submitting.';
$msg .= ' If you are already using a licensed player, entering the License Key here will make ';
$msg .= ' all 360° product rotations use the latest 360° player from the cloud.
';
echo $msg;
}
public function print_legacy_section_info_endwrapper()
{
echo '