• Resolved jeffatrmc

    (@jeffatrmc)


    Hi,

    Whenever I visit or work on my testing site I keep getting a weird error: Warning: Use of undefined constant ‘wc_stripe_before_process_payment’ – assumed ‘‘wc_stripe_before_process_payment’’ (this will throw an Error in a future version of PHP) in /home/kqlvvwgb6x1r/public_html/staging/wp-content/themes/enfold-child/functions.php on line 229

    I only get this on the testing site not the live one and I am not 100% sure why or if I should be concerned about it. Here is the code it is referencing:

    add_action(‘wc_stripe_before_process_payment’, function($order, $gateway_id){
    if(is_checkout()){
    $_POST[“{$gateway_id}_save_source_key”] = ‘yes’;
    }
    }, 10, 2);

    Should I be concerned about it or change my code? Let me know what you reccomend.

    Best,
    Jeff

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @jeffatrmc,

    This is not an issue with my plugin but rather your snippet of custom code. Make sure you are using single quotes around the action name wc_stripe_before_process_payment. What version of PHP is your test site running?

    Kind Regards,

    Thread Starter jeffatrmc

    (@jeffatrmc)

    Hi @mrclayton

    I figured that. Here is the code I use it seems to use the single quote around that function:

    add_action(‘wc_stripe_before_process_payment’, function($order, $gateway_id){
    if(is_checkout()){
    $_POST[“{$gateway_id}_save_source_key”] = ‘yes’;
    }
    }, 10, 2);

    I am on the most up to date version of PHP not sure exactly what that is but we are always on the most recent release.

    Again this is only on the testing site it may mean nothing but I thought I’d reach out just in case.

    Best,
    Jeff

    Plugin Author Payment Plugins

    (@mrclayton)

    @jeffatrmc,

    Copy and paste your code in to notepad then copy it from notepad into your functions.php file. Looks to me like you have some incompatible characters in your code.

    Kind Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Weird warning on staging site’ is closed to new replies.