• I’m not able to select the Model author’s store correctly

    add_action('elementor/theme/register_conditions', function($conditions_manager) {
        
        class Page_Template_Condition extends ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base {
            
            public static function get_type() {
                return 'singular';
            }
    
            public static function get_priority() {
                return 30;
            }
    
            public function get_name() {
                return 'page_template';
            }
    
            public function get_label() {
                return __('Page Template');
            }
    
            public function check($args) {
                $vendor_id = apply_filters('wcfm_current_vendor_id', get_current_user_id());
    
                return is_singular('wcfm-stores') && wcfm_is_store_page($vendor_id);
            }
        }
    
        $conditions_manager->get_condition('singular')->register_sub_condition(new Page_Template_Condition());
        
    }, 100);
    
    • This topic was modified 10 months, 1 week ago by lojasapp.
  • The topic ‘Help with Store Model’ is closed to new replies.