• Resolved marscj

    (@marscj)


    I set up stripe’s payment gateway, and webhook, and when I finish paying it always reminds me Cannot read properties of undefined (reading ‘post’). I’ve checked stripe’s records and everything is fine

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter marscj

    (@marscj)

    Thread Starter marscj

    (@marscj)

    add_filter( ‘script_loader_tag’, ‘tec_fix_filter_modify_to_module’, 10, 2 );

    function tec_fix_filter_modify_to_module( $tag, $handle ) {

    if (
    ‘tec-ky-module’ !== $handle
    && ‘tec-ky’ !== $handle
    && ‘tec-tickets-commerce-gateway-stripe-checkout’ !== $handle
    ) {
    return $tag;
    }

    // These themes already have the type='text/javascript' added by WordPress core.
    if ( ! current_theme_supports( ‘html5’, ‘script’ ) ) {
    $replacement = ‘type=”module”‘;

    return str_replace( “type=’text/javascript'”, $replacement, $tag );
    }

    $replacement = ‘<script type=”module” ‘;

    return str_replace( ‘<script ‘, $replacement, $tag );

    }
    this is worked

    Hi @marscj,

    Thanks for reaching out to us.

    Indeed, that’s a known issue we’ve listed on our known issues page.

    You’ve applied the proper patch to fix it, and we’ll be solving this one in the upcoming release pretty soon.

    Thanks for reporting. I’ll be marking this one as resolved.

    Have a wonderful day,
    Juan.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cannot read properties of undefined (reading ‘post’)’ is closed to new replies.