Add Elementor Display Sub Condition of Product Type

im looking for a way to add custom conditions to elementor's display condition, especially by product type. thats my code so far: <?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } use ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base; class Product_Type_Condition extends Condition_Base { public function get_name() { return 'product_type_condition'; } public function get_label() { return __( 'Product Type', 'text-domain' ); } public function get_type() { return 'product'; } public function check( $args ) { ... } } class Product_Type_Sub_Condition extends Condition_Base { private $product_type_key; private $product_type_label; public function __construct( $product_type_key, $product_type_label ) { $this->product_type_key = $product_type_key; $this->product_type_label = $product_type_label; } public function get_name() { return 'product_type_sub_condition_' . $this->product_type_key; } public function get_label() { return $this->product_type_label; } public function check( $args ) { ... } } add_action( 'elementor/theme/register_conditions', 'register_custom_product_type_condition' ); function register_custom_product_type_condition( $conditions_manager ) { $conditions_manager->register( new Product_Type_Condition() ); } the result im getting close, but all the sub conditions list display in the same main condition list.

Comment (0)

You’ll be in good company