Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @propeltoexcel

    I hope you are doing well.

    I am afraid this code is a bit old, almost a year ago, we did have an update on the NO_SHIPPING script, it is possible to affect this description too.

    I pinged our developers to verify if we have any version only for description.

    We will update once hearing back from the plugin team.
    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @propeltoexcel

    Can you please try this version?

    https://gist.github.com/wpmudev-sls/d0298dfc427dfe83493d248dfe6dd1a4

    You can update the description at line 33:
    https://gist.github.com/wpmudev-sls/d0298dfc427dfe83493d248dfe6dd1a4#file-forminator-paypal-description-php-L33

    Let us know the result you got.
    Best Regards
    Patrick Freitas

    Thread Starter propeltoexcel

    (@propeltoexcel)

    Wow, you really seem to be the solution to all my coding problems. Thanks Pat!

    Thread Starter propeltoexcel

    (@propeltoexcel)

    Warning: json_decode() expects parameter 1 to be string, array given in ../wp-content/mu-plugins/forminator-paypal-transaction-description.php on line 25

    I do get this error in WordPress though. Any idea what might cause this?

    The line is:
    $body = ( is_array( $parsed_args ) && isset( $parsed_args[ 'body' ] ) ) ? json_decode( $parsed_args[ 'body' ] ) : null;

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @propeltoexcel

    This warning would mean that the code may be getting invalid/unexpected value in HTTP response to be further processed. I’m not yet quite sure, though, if this would be a serious issue in this case or just a “side effect” of code running also when it’s simply not needed.

    The code hooks to “http_request_args” which isn’t specific to Forminator or PayPal at all so it runs every time any HTTP request is made by the site/WordPress core. It won’t do anything “useful” if it’s not request to PayPal (see line 27 which checks it) but it will run and that may, indeed, result in such warnings.

    But if it does for you what’s expected to do, I’d say this warning could be safely ignored and if you won’t keep WordPress debugging enabled all the time (which should never be on production site anyway) it shouldn’t even be “noticeable”.

    Kind regards
    Adam

    Thread Starter propeltoexcel

    (@propeltoexcel)

    Great insights! thanks Adam.

    Thread Starter propeltoexcel

    (@propeltoexcel)

    I just double checked, but I still had it on
    define( 'WP_DEBUG', false );

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @propeltoexcel

    Could you inser this one and see if that helps?

    define('WP_DEBUG', false);
    define('WP_DEBUG_LOG', false);
    define('WP_DEBUG_DISPLAY', false);

    Kind Regards,
    Kris

    Thread Starter propeltoexcel

    (@propeltoexcel)

    That worked, thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How can I populate ‘Description’ in PayPal invoice?’ is closed to new replies.