Skip to content

Commit

Permalink
Fix: Server protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-theo committed Sep 11, 2020
1 parent 5d11dee commit 67efdc4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion class/actions_doliwpshop.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,18 @@ public function addMoreActionsButtons($parameters, &$object, &$action)
}

if (empty($object->array_options['options__wps_id'])) {
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

if ( isset( $_SERVER['HTTPS'] ) ) {
if ( $_SERVER['HTTPS'] == 'on' ) {
$server_protocol = 'https';
} else {
$server_protocol = 'http';
}
} else {
$server_protocol = 'http';
}

$actual_link = $server_protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$actual_link .= '&action=createwp';
print '<div class="inline-block divButAction"><a class="butAction" href="' . $actual_link . '">'.$langs->trans("CreateOnWPshop").'</a></div>';

Expand Down

0 comments on commit 67efdc4

Please sign in to comment.