diff --git a/blocks/membership/membership.php b/blocks/membership/membership.php index 7c9ce534..d63c50a9 100644 --- a/blocks/membership/membership.php +++ b/blocks/membership/membership.php @@ -76,12 +76,12 @@ function doliconnect_membership_render_block( $attributes ) { $html = ""; if (is_user_logged_in() && constant("DOLIBARR_MEMBER") > 0){ -$adherent = callDoliApi("GET", "/adherentsplus/".constant("DOLIBARR_MEMBER"), "", HOUR_IN_SECONDS); +$adherent = callDoliApi("GET", "/adherentsplus/".constant("DOLIBARR_MEMBER"), null, dolidelay('member', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null), true)); } -$typeadhesion = callDoliApi("GET", "/adherentsplus/type?sortfield=t.price&sqlfilters=(t.family:!=:'1')&sortorder=ASC", "", dolidelay(MONTH_IN_SECONDS, esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null), true)); +$typeadhesion = callDoliApi("GET", "/adherentsplus/type?sortfield=t.price&sqlfilters=(t.family:!=:'1')&sortorder=ASC", null, dolidelay('member', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null), true)); -$typeadhesionpro = callDoliApi("GET", "/adherentsplus/type?sortfield=t.price&sqlfilters=(t.family:=:'1')&sortorder=ASC", "", dolidelay(MONTH_IN_SECONDS, esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null), true)); +$typeadhesionpro = callDoliApi("GET", "/adherentsplus/type?sortfield=t.price&sqlfilters=(t.family:=:'1')&sortorder=ASC", null, dolidelay('member', esc_attr(isset($_GET["refresh"]) ? $_GET["refresh"] : null), true)); if ( $typeadhesionpro->error->code != '404' ) { $html .= '