/** * Handle the coupons submission * * @return void */ function handle_coupons() { if (!is_user_logged_in()) { return; } if (!dokan_is_user_seller(get_current_user_id())) { return; } // Coupon functionality self::$validated = $this->validate(); if (!is_wp_error(self::$validated)) { $this->coupons_create(); } $this->coupun_delete(); }