How to enable and disable a polygon collider through c sharp

I am making a 2D horizontal inifinite runner.

At the moment i have to rows of platforms and the charachter jumps from platform to platfrom. If he is on the bottom row and jumps he will hit his head against the bottom of the top row. I’d like to make him go through the top row instead of hitting his head, but then, if he is high enough, lands the platform in question on the top row.

I have researched and tried to do this by having the polygon collider of the platform in the top row to be a trigger, then when the groundcheck of the player states that the player is grounded I disable the trigger of the polygon collider on the platform.

This is as far as I got:

using UnityEngine;
using System.Collections;

public class GoThroughCeilingScript : MonoBehaviour {

	PlatformerCharacter2D plat;

	[SerializeField] LayerMask whatIsCeiling;
	[SerializeField] LayerMask whatIsGround;
	
	Transform groundCheck;
	float groundedRadius = .4f;							// Radius of the overlap circle to determine if grounded
	bool grounded = false;
	bool ceiling = false;
	Transform ceilingCheck;	
	float ceilingRadius = .01f;
	Animator anim;
	Collider PC;

	void Awake ()
	{
		groundCheck = transform.Find("GroundCheck");
		ceilingCheck = transform.Find("CeilingCheck");
		anim = GetComponent<Animator>();

		PC = GetComponent.PolygonCollider2D;

		PC.isTrigger = true;

	}

	void FixedUpdate ()
	{

		// The player is grounded if a circlecast to the groundcheck position hits anything designated as ground
		grounded = Physics2D.OverlapCircle(groundCheck.position, groundedRadius, whatIsGround);
		anim.SetBool("Ground", grounded);

		// The player is ceiling if a circlecast to the groundcheck position hits anything designated as ground
		ceiling = Physics2D.OverlapCircle(ceilingCheck.position, ceilingRadius, whatIsCeiling);
		anim.SetBool("Ceiling", ceiling);

		if(grounded)
			PC.isTrigger = false;

	}
	
}

try this:

Collider2D PC = this.GetComponent("Collider2D")as Collider2D;
PC.isTrigger = true;

Thanks @EvilTak … This worked great! Well I changed it a bit but thanks for all the help! This is my working script if anyone encounters the same issue:

using UnityEngine;
using System.Collections;

public class GoThroughCeilingScript : MonoBehaviour {

    public Transform playerObject;
    Collider2D PC;

    void FixedUpdate ()
    {
       Collider2D PC = this.gameObject.collider2D;

       Vector2 playerPos = playerObject.transform.position; 
       Vector2 colliderPos = PC.transform.position;

       PC.isTrigger = true;

       if(playerPos.y > (colliderPos.y + 1.7))  
         PC.isTrigger = false;
    }
}