A Simple Guide to Deleting Custom Types in JetEngine using PHP | WordPress Today Agency

Streamline Your Site: A Guide to Deleting Custom Types in JetEngine using PHP

A few days ago I was working on a project that was using JetFormBuilder and JetEngine CCTs via REST API and I needed some custom functionality between a form created with JetFormBuilder and the website. I spent a lot of hours trying to figure out how to create/update/delete JetEngine CCTs using PHP code and I found exactly 0 documentation on the matter so I decided to share the code as it may help other people as well.

				
					    $cct_name = ‘test’; // Name of the Custom Content Type. Don’t add “jet-cct-“ as JetEngine will add it by default.
  $cct_id = 10; // The ID of the Custom Content Type item you want to delete.
  $content_type =  \Jet_Engine\Modules\Custom_Content_Types\Module::instance()->manager->get_content_types($cct_name);
  $handler = $content_type->get_item_handler();
  $handler->delete_item($cct_id);
				
			

That’s it! 

If you have any difficulties or you enjoyed this post, feel free to leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *


Leave a Reply

Your email address will not be published. Required fields are marked *


Related Posts

Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.



Wordpress Today Agency Logo


Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.

 


Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.



Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.
You can also email us at contact@wordpresstoday.agency

 


Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.
You can also email us at contact@wordpresstoday.agency

 


Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.
You can also email us at contact@wordpresstoday.agency

 


Wordpress Today Agency Logo

Let’s talk about your project and how it aligns with your business strategy.
You can also email us at contact@wordpresstoday.agency