Support » Plugin: Mailjet Email Marketing » General misunderstanding

  • Hi, I’m using your plugin in a custom method which add contacts to a list from a custom form.
    Everything was ok, since the last update of your plugin (from 4.1.18, yes, I know I’ve got a few versions in late), so I decided to take a look at the code to find where the problem came from…
    A little explenation :
    I’m using the function addContact, I do not understand why this function is declared THREE times? Same for the function manageManyContacts (which once just empty, awesome).
    What is the point of deciding to change parameter names by removing capital letters: Action => action, ListID => listID etc? We do not find, in addition, not necessarily further.
    I develop some plugins, I know we can do average things, but we simply do not push them on a public branch.
    Finally, it’s always nice to update the explanations of the functions in its code (params, etc), we are not soothsayers.

    For now I’m going to keep the 4.1.18 version.

Viewing 1 replies (of 1 total)
  • Plugin Author Mailjet

    (@mailjet)

    Hello Marie,

    addContact and manageManyContacts are part of the WP_Mailjet_Api_Interface
    Interfaces have many positive aspects.The use of interfaces becomes very helpful when we work in a team of programmers and want to ensure that all the programmers write the methods that they should work on, or even in the case of a single programmer that wants to commit himself to write certain methods.
    So all classes that implement this interface are required to have these methods.
    The empty function declaration is required as a backward compatibility to our old API specs.

    Regarding change of the letter case of some parameter names – this is done to match the expected parameters in Mailjet’s API.

    We remain at your disposal,
    Mailjet Team

Viewing 1 replies (of 1 total)
  • The topic ‘General misunderstanding’ is closed to new replies.