Support » Plugin: WooCommerce » endless spinning disc on checkout page with payment gateway filter applied

  • Resolved niester



    I am using Gravity Forms with Woocommerce. I set the parameters in gravity forms to forward the gravity forms entry id as part of the URL ( e.g. )

    I am then using the “woocommerce_available_payment_gateways” filter to apply a transformation to the available gateways based on the data from the specific gravity forms entry id.

    Everything works great until I enter the following line of code:

    $dif_gf_entry_finaid = $dif_gf_entry['30'];

    If I leave that ONE line commented out I don’t get the spinning disc. As soon as I include that line of code I get the spinning disc forever

    I’m at a loss and would love any and all help that this community can provide. For reference here is my complete snippet code:

    add_filter( 'woocommerce_available_payment_gateways', 'dif_unset_gateway_by_aid' );
    function dif_unset_gateway_by_aid( $available_gateways ) {
        if ( is_admin() ) return $available_gateways;
        if ( ! is_checkout() ) return $available_gateways;
    // set unset to true so we remove the check option by default from all types of carts
    	$unset = true;
    	// get form and entry id of submitted form from query headers
    	$dif_gf_entry_id = $_GET['entry_id'];
    	$dif_gf_form_id = $_GET['form_id'];
    	// retrieve Gravity Forms Entry associated with cart
    	$dif_gf_entry = GFAPI::get_entry( $dif_gf_entry_id );
    	// retrieve value of financial aid requested "Yes" or "No"
    	echo "FIN AID REQ?:  ";
    	$fin_aid_key = '30';
    	$dif_gf_entry_finaid = $dif_gf_entry['30'];
    	if ($dif_gf_entry_finaid === "Yes") $unset = false;
    // check unset credit card variable ($unset) and if true unset cheque.  this is the default status.
        if ( $unset == true ) unset( $available_gateways['cheque'] );
    	if ( $unset == false ) unset( $available_gateways['stripe']);
        return $available_gateways;

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support John Coy a11n


    Automattic Happiness Engineer

    Hi @niester

    I noticed you have received a reply yet. For an immediate solution, recommend one of the services listed on this page who can assist with any custom development work:

    Hopefully, this gets you going in the right direction to get the problem solved.

    Plugin Support Con a11n


    Automattic Happiness Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘endless spinning disc on checkout page with payment gateway filter applied’ is closed to new replies.