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;
}
/**
* Print the Section text for shortcode options
*/
public function print_section_info_woocommerce()
{
//$msg = '
.';
//$msg .= '
';
$msg = 'WooCommerce Settings';
echo $msg;
}
/**
* Print the Section text for shortcode options
*/
public function print_section_info_advanced()
{
//$msg = '
.';
//$msg .= '
';
$msg = '';
echo $msg;
}
/**
* Print the Section text for shortcode options
*/
public function print_section_cache()
{
$msg = '
Cache Management';
$msg .= '
';
$msg = '';
echo $msg;
}
/**
* Print the Section text for shortcode options
*/
public function print_section_info_shortcode()
{
$msg = '
Set default site-wide default shortcode values for embedding the 360° product rotation.';
$msg .= '
';
echo $msg;
}
public function print_section_info_legacy()
{
$msg = '
Settings for the 360° views created by the desktop application "3DRT Setup Utility" ';
$msg .= 'The application is being gradually replaced by the web-based version';
$msg .= '
';
echo $msg;
}
/**
* Get the settings option array and print one of its values
*/
public
function licenseid_callback()
{
printf(
'',
isset($this->options['license_id']) ? esc_attr($this->options['license_id']) : ''
);
}
public
function local_engine_callback()
{
$desc = ' If checked, the local rotatetool.js uploaded with the 360 view will be used, instead of the global one.';
printf(
'%s',
isset($this->options['local_engine']) ? 'checked' : '', $desc
);
}
public function woocommerce_alternate_embedding_callback()
{
$desc = ' If checked, the 360 view player is inserted into the product gallery using JavaScript. This might help with multiple product galleries in one page issues.';
printf(
'%s',
isset($this->options['woocommerce_alternate_embedding']) ? 'checked' : '', $desc
);
}
/**
* Get the settings option array and print one of its values
*/
public
function rotatetooljs_url_callback()
{
printf(
'',
isset($this->options['rotatetooljs_url']) ? esc_attr($this->options['rotatetooljs_url']) : ''
);
}
/**
* Get the settings option array and print one of its values
*/
public function theme_url_callback()
{
$desc = ' If provided, all 360 views will use this theme. Example: http://www.example.com/360/themes/pure-white/';
printf(
' %s',
isset($this->options['theme_url']) ? esc_attr($this->options['theme_url']) : '', $desc
);
}
/**
* Get the settings option array and print one of its values
*/
public
function iframe_styles_callback()
{
$desc = ' When not set, this default is used: "max-width: 100%; border: 1px solid silver;"';
$desc .= ' You can disable the 360° view border by entering: "max-width: 100%; border: 0px;"';
printf(
'%s',
isset($this->options['iframe_styles']) ? esc_attr($this->options['iframe_styles']) : '', $desc
);
}
/**
* Get the settings option array and print one of its values
*/
public
function ga_enabled_callback()
{
$desc = ' Turns on Google Analytics Events Tracking. More Info.';
printf(
'%s',
isset($this->options['ga_enabled']) ? 'checked' : '', $desc
);
}
/**
* Get the settings option array and print one of its values
*/
public
function ga_tracking_id_callback()
{
$desc = ' Your Google Analytics profile tracking ID, e.g. UA-123456-7';
printf(
'%s',
isset($this->options['ga_tracking_id']) ? esc_attr($this->options['ga_tracking_id']) : '', $desc
);
}
/**
* Get the settings html form code
*/
public
function woocommerce_360thumb_url_callback()
{
printf(
'',
isset($this->options['woocommerce_360thumb_url']) ? esc_attr($this->options['woocommerce_360thumb_url']) : ''
);
}
/**
* Checks if order data is valid
*
* @param $license_id
* @return array|null
*/
private
function _get_order_data($license_id)
{
$url = YOFLA_LICENSE_ID_CHECK_URL . $license_id;
add_filter('https_local_ssl_verify', '__return_false');
$response = wp_remote_get($url);
if (is_wp_error($response)) {
$error = $response->get_error_message();
$msg = '