• Resolved Julien Zerbib

    (@julien-zerbib)


    Hi,

    Just to tell that your plugin CANNOT work on a translated WordPress Site in French or Russian.

    As a matter of fact, I found errors in “includes/admin.php”.

    Line 68 :
    if ( $action == "Deny" ) {
    has to be if ( $action == __( "Deny", 'bp-registration-options' ) ) {

    Line 71 :
    if ( $action == "Approve" ) {
    has to be if ( $action == __( "Approve", 'bp-registration-options' ) ) {

    Same thing at Lines 83 and 88

    Furthermore, your plugin CANNOT send email to user….

    As a matter of fact, there is an error, in the same file, at line 82 :
    $user = get_userdata( $user_id ); should be $user = get_userdata( $user_id )->data;

    Thanks

    Julien

    https://wordpress.org/plugins/bp-registration-options/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure I’m agreeing with the last one regarding the user data. I should be accessing the right property after the fact, and I don’t believe get_userdata( $user_id )->data; is fully supported in older php versions that I still have to put in consideration.

    Regarding the translations part, if you could file an issue on our GitHub page for that, I’d appreciate it as a reminder. I’m doing a lot of reworking of the plugin as a whole, and hope to get translations top notch and proper. I agree what’s there isn’t what it should be.

    Thread Starter Julien Zerbib

    (@julien-zerbib)

    Hi Michael,

    Thanks for your answer.

    I have tested it this morning, get_userdata( $user_id ) returns an object containing, between others, a data property which contains the user_email.

    For the get_userdata( $user_id )->data;, I totally agree with you !
    This is not a really good practice for a plugin, but worked fine on my project ^^
    You should do something like :

    $user_object = get_userdata( $user_id );
    $user = $user_object->data;

    For the translation part, I really think it’s a mistake to translate input values ! It cannot work for example with a multilingual plugin (I usually use PolyLang). In fact, when you change the language of your profile, it should break the process.
    The problem is that it comes from another part of your plugin I did not look for (not necessary with my project).

    Do you want me to dig it ?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’ll get the data property part fixed in the next release. Thanks for pointing out the error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Other Languages Versions CANNOT work’ is closed to new replies.