Elementor sends default request https://api.mailerlite.com/api/v2/group, and result’s 100 teams, however I’ve greater than 100 teams. I must ship such a request https://api.mailerlite.com/api/v2/teams?restrict=120. The code is within the pluginselementor-promodulesformsclassesmailerlite-handler.php
. For now I hardcoded the perform, and it’s working, however it’s not acceptable.
public perform get_groups() {
$outcomes = $this->rest_client->get( 'teams?restrict=250' );
$teams = [
'' => esc_html__( 'Select...', 'elementor-pro' ),
];
if ( 200 === $outcomes['code'] ) {
foreach ( $outcomes['body'] as $index => $group ) {
$teams[ $group['id'] ] = $group['name'];
}
}
$return_array = [
'groups' => $groups,
'fields' => $this->get_fields(),
];
return $return_array;
}
?restrict=120
is from me.