I think I found it. I changed ...
if ( !is_dir(WP_PLUGIN_DIR . '/' . $slug) && strpos($feature['download_url'], 'wordpress.org') === false )
{
// not a public WP plugin. Must be hosted privately
if ( !$pro )
{
// It's free, just let them have it
$response = wp_remote_get(
$feature['download_url'],
array(
'timeout' => 60,
'sslverify' => true,
)
);
}
else
{
// Run through server check to ensure only the genuinely lovely humans get this Pro feature
$response = wp_remote_post(
'
https://wp-property-hive.com/activate-pro-feature.php',
array(
'timeout' => 60,
'sslverify' => true,
'headers' => array(
'Content-Type' => 'application/json',
'X-PH-License-Key' => get_option( 'propertyhive_pro_license_key', '' ),
'X-PH-License-Type' => PH()->license->get_license_type(),
'X-PH-Instance-Id' => get_option( 'propertyhive_pro_instance_id', '' ),
'X-PH-Plugin-Version' => PH_VERSION,
),
'body' => wp_json_encode(array(
'wordpress_plugin_file' => $feature['wordpress_plugin_file'],
)),
)
);
}
to
if ( !is_dir(WP_PLUGIN_DIR . '/' . $slug) && strpos($feature['download_url'], 'wordpress.org') === false )
{
// not a public WP plugin. Must be hosted privately
if ( !$pro )
{
// It's free, just let them have it
$response = wp_remote_get(
$feature['download_url'],
array(
'timeout' => 60,
'sslverify' => true,
)
);
}
else
{
// It's free, just let them have it
$response = wp_remote_get(
$feature['download_url'],
array(
'timeout' => 60,
'sslverify' => true,
)
);
}
I am doing some testing and then will upload it to the resource.
Thanks for all the help