• Resolved leovicio

    (@leovicio)


    I would like to remove the “Purchase” pixel from the thank you page for a specific payment method example: bank transfer

    I could remove the pixel but the layout was bugged
    did it the right way?

    /*Remover Pixel para boleto*/
    function remove_facebook_puxel_boleto( $order_id ) {
    $payment_gateway = wc_get_payment_gateway_by_order( $order_id );
    $payment_name = $payment_gateway->get_title();

    if (strpos($payment_name, ‘Boleto’) !== false) {
    if (class_exists( ‘WC_Facebookcommerce’ ) ){
    remove_action( ‘woocommerce_thankyou’, array( WC_Facebookcommerce()->WC_Facebookcommerce_Integration()->WC_Facebookcommerce_EventsTracker(), ‘inject_gateway_purchase_event’, 2 ) );
    }
    }

    }

    add_action( ‘woocommerce_thankyou’, ‘remove_facebook_puxel_boleto’,1);

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